- It is impossible to know from the argument whether the user passed the
color
prop or it is a default value defined in the button-like component - the value seems have always fallback value. Usecase: I wan't to usecurrentColor
as default value for color only foroutline
variant and only if user not passed different value with prop, even if this value is the same as default one.
Example: we like how tabs looks, except that we don't have ability to change spacing between tab pills (data-variant="pill"
). For this case we write a simple component-wrapper, with one purpose - to support spacing
prop: