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?: Accessibility | ||
|
|
||
| icon?: ShorthandValue |
There was a problem hiding this comment.
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.
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.
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
| - 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.
Please replace with:
Allow to pass children and content to MenuDivider @layershifter (#1009)
Fixes #944.
Why
content?We can introduce an
iconshorthand, but what if I want to pass chars? OurDividercomponent also acceptscontent/children.