-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ToolbarItem): use compose() #13321
feat(ToolbarItem): use compose() #13321
Conversation
@@ -126,7 +127,7 @@ const ToolbarRadioGroup: React.FC<WithAsProp<ToolbarRadioGroupProps>> & | |||
return ToolbarDivider.create(item); | |||
} | |||
|
|||
const toolbarItem = ToolbarItem.create(item, { | |||
const toolbarItem = createShorthand(ToolbarItem, item, { |
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.
ToolbarItem.create
was removed
@@ -186,6 +186,9 @@ ToolbarMenu.defaultProps = { | |||
}; | |||
|
|||
ToolbarMenu.create = createShorthandFactory({ Component: ToolbarMenu, mappedArrayProp: 'items' }); | |||
ToolbarMenu.shorthandConfig = { |
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.
We need this in the ToolbarItem
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.
Can we removed after compose is added in ToolbarMenu
Perf AnalysisNo significant results to display. All results
Perf Analysis (Fluent)Potential regressions comparing to master
Perf comparison
Perf tests with no regressions
|
packages/fluentui/react-northstar/src/components/Toolbar/ToolbarItemIcon.tsx
Outdated
Show resolved
Hide resolved
packages/fluentui/react-northstar/src/components/Toolbar/ToolbarItemWrapper.tsx
Outdated
Show resolved
Hide resolved
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 1dc036b4710ae47094ba6c8bd5d3f4e3a09e9ea7 (build) |
…eat/toolbar-item-compose
…va/office-ui-fabric-react into feat/toolbar-item-compose � Conflicts: � packages/fluentui/CHANGELOG.md
# Conflicts: # packages/fluentui/CHANGELOG.md # packages/fluentui/react-northstar/src/components/Toolbar/ToolbarRadioGroup.tsx
-added missing variables
# Conflicts: # packages/fluentui/CHANGELOG.md # packages/fluentui/docs/src/examples/components/Toolbar/Visual/ToolbarExampleCompose.shorthand.tsx # packages/fluentui/react-northstar/src/components/Toolbar/Toolbar.tsx
-expanded example
); | ||
}; | ||
const renderOverflowItem = overflowItem => | ||
createShorthand(composeOptions.slots.overflowItem, overflowItem, { |
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.
Oops we forgot ToolbarItem
here..
* wip * added icon and fixed menu * -updated changelog * push changes related to refs * -merge conflicts fixes * -expanded example -added missing variables * -fixed e2e * -resolved merge conflicts * -fixed toolbar radio group -expanded example Co-authored-by: Oleksandr Fediashov <olfedias@microsoft.com>
This PR adds compose functionality to
ToolbarItem
.BREAKING CHANGES
Restructured
className
exports for theToolbarItem
'swrapper
, which is now a component.Before
After