I know that I can customize standard MUI components like Button, but can I create my own MyCustomButton, that will have 'muiName' = 'MyCustomButton'
and that could be customized via theme configurations:
createTheme({
components: {
MyCustomButton: {
styleOverrides: {
root: {...},
MyCustomButtonSubComponent: {...}
}
}
}
})
Thank you for your answers!
You have a few options. Let say you want to create a fully customized button with MUI button's behavior.
You can use ButtonUnstyled
or the useButton
hook.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.