Default button is causing issues on components that use Button
See original GitHub issueWith the new changes that were done to Button
and default this is now effecting other components in which use Button
under the hood to made up that component
Expected Behavior
I would expect that if I had certain properties defined in theme for default button
these would not effect the components that are should be using plain button under the hood.
Actual Behavior
When you have in your theme
button: {
default: {
color: 'text',
border: undefined,
padding: {
horizontal: '12px',
vertical: '6px',
},
},
This will also effect the padding in accordion
and select
since these components are using button
there is unnecessary pad now in which the user would want the plain button to still be used in accordion
URL, screen shot, or Codepen exhibiting the issue
Steps to Reproduce
Currently there is a theme story for accordion if you make sure you have the latest master changes and grommet-theme-hpe-next
changes you will see the hover behavior and the extra padding of 12px horizontal and 6px vertical.
In accordionpanel.js
Button
is being used on line 90 and so if you set that button
prop plain then that will fix the issue.
I would assume that we would want to ignore these default props given to button if they are being used inside other components.
Your Environment
- Grommet version: [Shimi] stable branch
- Browser Name and version: [Shimi] any
- Operating System and version (desktop or mobile): [Shimi] any
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (3 by maintainers)
Top GitHub Comments
@ShimiSun this can be closed! The problem was fixed!
A fix for this issue is now available on the stable branch, let us know if you need us to address anything else in this area, before closing the issue.