-
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
chore(Toolbar): convert ToolbarDivider, ToolbarCustomItem & ToolbarItem to functional components #12161
Conversation
…em to functional components
@@ -39,9 +40,9 @@ export default toolbarItemBehavior; | |||
|
|||
export type ToolbarItemBehaviorProps = { | |||
/** Indicated if toolbar item has a menu. */ | |||
menu?: boolean | object; | |||
hasMenu?: boolean; |
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.
👍
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/src/components/Toolbar/ToolbarDivider.tsx
Outdated
Show resolved
Hide resolved
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: a724c8b57e290179f95db3f64759d4a11132a234 (build) |
@@ -46,49 +46,70 @@ export interface ToolbarCustomItemProps extends UIComponentProps, ChildrenCompon | |||
onBlur?: ComponentEventHandler<ToolbarCustomItemProps>; | |||
} | |||
|
|||
class ToolbarCustomItem extends UIComponent<WithAsProp<ToolbarCustomItemProps>> { | |||
static displayName = 'ToolbarCustomItem'; | |||
export type ToolbarCustomItemStylesProps = Required<Pick<ToolbarCustomItemProps, 'fitted'>>; |
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, why do you set 'fitted' as a required style prop?
Co-Authored-By: Marija Najdova <mnajdova@gmail.com>
Co-Authored-By: Marija Najdova <mnajdova@gmail.com>
Co-Authored-By: Marija Najdova <mnajdova@gmail.com>
…thub.com/OfficeDev/office-ui-fabric-react into chore/toolbar-cmpts-to-fc
Pull request checklist
$ yarn change
BREAKING CHANGES
This PR converts
ToolbarDivider
,ToolbarCustomItem
&ToolbarItem
components to be functional. As in all other cases it contains a breaking change with restricted props set that will be passed to styles functions.Prop sets
ToolbarDivider
ToolbarCustomItem
fitted
ToolbarItem
active
disabled
Microsoft Reviewers: Open in CodeFlow