Button: Migrate react-button to new DX#18607
Button: Migrate react-button to new DX#18607msft-fluent-ui-bot merged 34 commits intomicrosoft:masterfrom
Conversation
packages/react-button/src/components/CompoundButton/useCompoundButtonStyles.ts
Show resolved
Hide resolved
| import { Playground } from '../Playground'; | ||
| import { PlaygroundProps, PropDefinition } from '../Playground.types'; | ||
| import { ToggleButton, ToggleButtonProps } from './components/ToggleButton'; | ||
| import { Playground } from './Playground'; |
There was a problem hiding this comment.
suggestion: I assume Playground component is solely for storybook purposes? If yes please add to it stories suffix - this is current approach to distinguish what files are implementation related (thus being shipped to consumers) and which are not (stories/test/others...)
Hotell
left a comment
There was a problem hiding this comment.
few questions/comments. thanks!
7de543f to
32389fc
Compare
| @@ -1,7 +1,7 @@ | |||
| import * as React from 'react'; | |||
| import { Checkbox, Dropdown, IDropdownOption, Stack, TextField } from '@fluentui/react'; | |||
There was a problem hiding this comment.
you won't be able to use here anything from v7/v8 , so this would need a bit more refactoring
There was a problem hiding this comment.
Agreed, we should probably change this for native select + input + style overrides.
📊 Bundle size reportUnchanged fixtures
|
08bfaca to
010ca9d
Compare
Hotell
left a comment
There was a problem hiding this comment.
"one small step for man, one giant leap for THE button ! 😅"
awesome work @TristanWatanabe 🙌
|
Hello @TristanWatanabe! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
🎉 Handy links: |
#### Pull request checklist - [x] Addresses an existing issue: Fixes part of microsoft#18579 - [x] Include a change request file using `$ yarn change` #### Description of changes - migrates `react-button` package using `yarn nx workspace-generator migrate-converged-pkg` - moved `Playground.tsx` and `Playground.types.tsx` to `react-button` package as they were deleted by migration script. - updates `useCompountButtonStyles` to explicitly declare `marginTop` value to fix babel-loader error. - extracted `buttonBaseProps` from `Button` story to its own file. - updated import paths for all Button stories.


Pull request checklist
$ yarn changeDescription of changes
react-buttonpackage usingyarn nx workspace-generator migrate-converged-pkgPlayground.tsxandPlayground.types.tsxtoreact-buttonpackage as they were deleted by migration script.useCompountButtonStylesto explicitly declaremarginTopvalue to fix babel-loader error.buttonBasePropsfromButtonstory to its own file.