The button component works fine, but exposes too many options as props, when in reality, we might never need more than a small set of configurable options.
We should make the button component a bit more user friendly by providing some more default options.
The button type should be sufficient to determine the borderColor, hoverColor etc. Let's go with the accept and reject types for now, which have a bunch of preconfigured appearance - accept is green, reject is red etc. If the type is an empty string, we then consider the values of the other props for styling. The hoverColor can be replaced by a brightness filter.
We can similarly introduce a size prop from which we can infer some predetermined values for rounded, px, py, fontSize etc.
We should accept the button content as children, not as props.
We don't need to remove the preexisting options - just add some defaults over them.
Notes
Post some sample button screenshots using the implemented defaults in the PR description.
Description
The button component works fine, but exposes too many options as props, when in reality, we might never need more than a small set of configurable options.
We should make the button component a bit more user friendly by providing some more default options.
borderColor
,hoverColor
etc. Let's go with theaccept
andreject
types for now, which have a bunch of preconfigured appearance - accept is green, reject is red etc. If the type is an empty string, we then consider the values of the other props for styling. The hoverColor can be replaced by a brightness filter.rounded
,px
,py
,fontSize
etc.Notes