-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Component
Divider
Is this a regression?
None
Describe the bug
The Divider component's props create an inconsistent and confusing API for developers. The existing props include text, icon, and content, all used to insert elements into the divider. However, the positioning prop, contentPosition, controls the alignment of the text and icon props, but not the alignment of the content prop.
This ambiguity makes it unclear which prop is responsible for positioning which element, leading to frustrating trial-and-error for users trying to center their custom element supplied via the content prop
To Reproduce
-
Render a
<Divider />component and provide a value to thecontentprop (e.g.,<Divider content={<span>Custom Content</span>} />). -
Attempt to change the position of the custom content (
"before" | "after" | "center") using thecontentPositionprop. -
The position of the custom element supplied via the
contentprop does not change. ThecontentPositionprop only affects the position if thetextoriconprops are used.
Expected behavior
Rename the content prop (e.g., to swappableElement).
Screenshots
No response
Package version
v3.0.0
Desktop
. OS:
. Browser & version:
. Additional Information:
Smartphone
. Device:
. OS:
. Browser & version:
. Additional Information:
Exception or Error
Additional context
No response