-
Notifications
You must be signed in to change notification settings - Fork 54
feat(Menu): allow to pass content to MenuDivider
#1009
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1009 +/- ##
==========================================
- Coverage 81.38% 81.37% -0.02%
==========================================
Files 673 673
Lines 8693 8697 +4
Branches 1472 1475 +3
==========================================
+ Hits 7075 7077 +2
- Misses 1603 1605 +2
Partials 15 15
Continue to review full report at Codecov.
|
/** | ||
* Accessibility behavior if overridden by the user. | ||
* @default menuDividerBehavior | ||
*/ | ||
accessibility?: Accessibility | ||
|
||
icon?: ShorthandValue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how we are handling the icon
prop.. Are we adding both content and icon, or the intention is just the content
prop to be added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cruft, will remove it 👍
…at/menu-divider-content # Conflicts: # CHANGELOG.md
{...unhandledProps} | ||
className={classes.root} | ||
/> | ||
<ElementType {...accessibility.attributes.root} {...unhandledProps} className={classes.root}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add this to the ElementType
{...rtlTextContainer.getAttributes({ forElements: [children, content] })}
This will ensure that if the children or content are strings, there will be dir='auto'
applied.
CHANGELOG.md
Outdated
@@ -41,6 +41,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm | |||
- Add `reactionGroup` and `reactionGroupPosition` props to the `ChatMessage` component @mnajdova ([#959](https://github.com/stardust-ui/react/pull/959)) | |||
- Set `aria-modal` attribute for both Dialog and Popup with focus trap @sophieH29 ([#995](https://github.com/stardust-ui/react/pull/995)) | |||
- Allow arrays as shorthand for the Components containing prop of type `CollectionShorthand` @mnajdova ([#996](https://github.com/stardust-ui/react/pull/996)) | |||
- Allow to pass content to `MenuDivider` @layershifter ([#1009](https://github.com/stardust-ui/react/pull/1009)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace with:
Allow to pass children
and content
to MenuDivider
@layershifter (#1009)
Fixes #944.
Why
content
?We can introduce an
icon
shorthand, but what if I want to pass chars? OurDivider
component also acceptscontent
/children
.