You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the button component, we want to provide two more properties to support in the future the design system tokens:
className? (optional)
variant?: 'primary' | 'secondary' | 'tertiary';
The className property needs to provide the ability:
for the developer to provide his own class
needs to have the className dcx-button hardcoded (please use the utility classNames)
If the variant property is specified needs to provide the ability to choose between primary|secondary|tertiary so the className will become `dcx-button--[variant]
some examples:
the developer doesn't specify any className so the output will be:
<buttonclass="dcx-button">
the developer specifies his own class but not a variant:
<buttonclass="dcx-button daniele">
the developer specifies a variant primary
<buttonclass="dcx-button dcx-button--primary">
the developer specifies a variant secondary
<buttonclass="dcx-button dcx-button--secondary">
the developer specifies a variant primary and his own className
For the button component, we want to provide two more properties to support in the future the design system tokens:
The
className
property needs to provide the ability:dcx-button
hardcoded (please use the utilityclassNames
)If the
variant
property is specified needs to provide the ability to choose between primary|secondary|tertiary so the className will become `dcx-button--[variant]some examples:
primary
secondary
primary
and his own classNamePlease follow these steps to create your branch:
git checkout release/0.8 git pull git checkout -b 'feature/button-new-props'
The text was updated successfully, but these errors were encountered: