-
Notifications
You must be signed in to change notification settings - Fork 17.6k
feat(theming): make core components fully configurable via theme tokens #40985
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,7 @@ export const DropdownButton = ({ | |
| tooltip, | ||
| tooltipPlacement, | ||
| children, | ||
| styleConfig, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing unit tests for styleConfig
The new Code Review Run #03fc85 Should Bito avoid suggestions like this for future reviews? (Manage Rules)
|
||
| ...rest | ||
| }: DropdownButtonProps) => { | ||
| const theme = useTheme(); | ||
|
|
@@ -57,10 +58,10 @@ export const DropdownButton = ({ | |
| defaultBtnCss, | ||
| css` | ||
| .ant-btn { | ||
| height: 30px; | ||
| box-shadow: none; | ||
| font-size: ${theme.fontSizeSM}px; | ||
| font-weight: ${theme.fontWeightStrong}; | ||
| height: ${styleConfig?.controlHeight ?? 30}px; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: This hardcoded fallback height ignores the component's Severity Level: Major
|
||
| box-shadow: ${styleConfig?.boxShadow ?? 'none'}; | ||
| font-size: ${styleConfig?.fontSize ?? theme.fontSizeSM}px; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: The fallback font size is wired to Severity Level: Major
|
||
| font-weight: ${styleConfig?.fontWeight ?? theme.fontWeightStrong}; | ||
| } | ||
| `, | ||
| ]} | ||
|
|
||
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.
The
styleConfigdescription lists 7 properties butButtonStyleConfig(types.ts:43-52) includes 8 properties —borderRadiusis missing. Users relying on Storybook controls will not know this option exists.Code suggestion
Code Review Run #03fc85
Should Bito avoid suggestions like this for future reviews? (Manage Rules)