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:
<button class="dcx-button">
the developer specifies his own class but not a variant:
<button class="dcx-button daniele">
the developer specifies a variant primary
<button class="dcx-button dcx-button--primary">
the developer specifies a variant secondary
<button class="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: