You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any component that allows consumers to override its underlying DOM element (e.g., div, span) should rely on an as prop for consistency with the majority of Paragon components (given most rely on react-bootstrap).
The Truncate component uses an elementType component instead of as. At least one engineer assumed as prop would work, and had to rely on the documentation to learner that Truncate uses elementType instead.
Given one of the goals of Paragon is to provide a reasonably consistent props API across components, we should ensure that any component that allows consumers to override its underlying DOM element relies on an as prop.
The content you are editing has changed. Please copy your edits and refresh the page.
Improvements
Any component that allows consumers to override its underlying DOM element (e.g.,
div
,span
) should rely on anas
prop for consistency with the majority of Paragon components (given most rely onreact-bootstrap
).The
Truncate
component uses anelementType
component instead ofas
. At least one engineer assumedas
prop would work, and had to rely on the documentation to learner thatTruncate
useselementType
instead.Given one of the goals of Paragon is to provide a reasonably consistent props API across components, we should ensure that any component that allows consumers to override its underlying DOM element relies on an
as
prop.Tasks
The text was updated successfully, but these errors were encountered: