Closed dickermoshe closed 8 months ago
I would change two things:
Include the ShadcnButtonSizesTheme
in the ShadcnBaseTheme
. This ensures that when the ShadcnThemeData
is created, the default values are set.
Remove the default values from the ShadcnButtonSizesTheme
, and rename the buttonSizesTheme
in the ShadcnButtonTheme
to sizes
, because we’re already in a subtheme
This allows the user to customize the ShadcnButtonSizesTheme
for the whole app by passing the buttonSizesTheme
to ShadcnThemeData
, if someone wants to customize a specific button style, like the primary button, should set the sizes
parameter to the primaryButtonTheme
What do you think? Is kind of the same behaviors as radius
Done
Thanks for the PR, I really appreciate it 🙏
This implements the button sizes presets into its own theme object for more customization. If presets are being provided then they just be customizable. Having padding, height and width declared twice seems like bad practice
The order of importance for padding, height and width is as follows.