Should update api setting defaultProps of components #8442
Closed
woody146
started this conversation in
Feature requests
Replies: 1 comment
-
|
import { MantineProvider, ButtonProps, createTheme } from '@mantine/core';
const theme = createTheme({
components: {
Button: {
defaultProps: {
color: 'cyan',
variant: 'outline',
} satisfies ButtonProps,
},
},
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, updating defaultProps as below
But updating
defaultPropswill be for the entire app, so the initial download size of the app will include the code of the above component. If you update all 100+ components, the initial download size of the app will be very large. Therefore, you should move the functionextend()to a separate function.Beta Was this translation helpful? Give feedback.
All reactions