-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[material-ui][Checkbox] large
size added in type
#34909
Conversation
Netlify deploy previewhttps://deploy-preview-34909--material-ui.netlify.app/ Bundle size report |
Could you please create a Checkbox.spec.ts file and verify if the change works? |
@@ -88,7 +88,7 @@ export interface CheckboxProps | |||
* `small` is equivalent to the dense checkbox styling. | |||
* @default 'medium' | |||
*/ | |||
size?: OverridableStringUnion<'small' | 'medium', CheckboxPropsSizeOverrides>; | |||
size?: OverridableStringUnion<'small' | 'medium' | 'large', CheckboxPropsSizeOverrides>; |
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.
This is not a value supported by default by the Checkbox, it's a user theme extension, so
size?: OverridableStringUnion<'small' | 'medium' | 'large', CheckboxPropsSizeOverrides>; | |
size?: OverridableStringUnion<'small' | 'medium', CheckboxPropsSizeOverrides>; |
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.
How so? https://codesandbox.io/s/keen-panini-nu7vsh?file=/demo.tsx seems to work with the vanilla theme (sans the type checker, of course).
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.
From my perspective, a large checkbox makes little sense at the design level. I can't recall one interface where I saw a normal and a large checkbox variant (≠ customizing the default size checkbox to look smaller or bigger), and where it felt awesome, I recall opposite instances. It feels strange in https://blueprintjs.com/docs/#core/components/checkbox and https://chakra-ui.com/docs/components/checkbox/usage#checkbox-sizes.
The SvgIcon has some logic to handle the size large prop but we don't document that large
is possible, e.g. https://mui.com/material-ui/react-checkbox/#size. It wasn't done on purpose, nor the actual size it has was designed on purpose. IHMO, if we decide to support the large variant, then we would need to customize it. It could feel better smaller.
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.
No decision has been made based on the above discussion, so I'm closing this pull request. |
large
size added in type
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.
Given the upvotes and requests in #34907, I believe we can consider supporting the type. Let's discuss further in a separate issue to decide whether to support the feature or not.
Co-authored-by: Michael Brunner <michael.brunner@sm0x.org> Co-authored-by: ZeeshanTamboli <zeeshan.tamboli@gmail.com>
Here is a proposal
Fixes #34907