Open weeman1337 opened 10 months ago
I favour the second option - adding new button kind
s for the destructive variants.
Right now all the kinds support a destructive variant - so the second prop destructive
would work well - but it's possible that won't be the case in future.
I think we can deprecate destructive
with a console warning, and treat it as primary-destructive
until it is removed.
@weeman1337
Agree with @kerryarchibald. That's how it's set up in Figma, too.
One minor exception, though. On Figma, we consistently use "Type" (Primary, Secondary, Tertiary, Primary Destructive, etc.) rather than "Kind" for the main variant property name. Unsure why it got named "kind" on the implementation side.
Compound designs differentiate between „primary destructive“ and „secondary destructive“ buttons.
https://www.figma.com/file/rTaQE2nIUSLav4Tg3nozq7/Compound-Web-Components?type=design&node-id=636-4&mode=design&t=RQVCJaX5SNce2GlF-0
Current Web implementation only supports one
kind
=primary
,secondary
,tertiary
ordestructive
.I am happy to contribute here. But we should decide about how we do it, e.g.:
kind
prop and add an additionaldestructive
orsub-kind
prop~primary-destructive
andsecondary-destructive
(keep and deprecatedestructive
as alias for `secondary-destructive)