Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
Add neutral-destructive button (#1648)
Ivan Starkov667902d599ca
diff --git a/packages/design-system/src/components/button.stories.tsx b/packages/design-system/src/components/button.stories.tsxindex 88ae95fdc5..4264266f3f 100644--- a/packages/design-system/src/components/button.stories.tsx+++ b/packages/design-system/src/components/button.stories.tsx@@ -25,6 +25,7 @@ const colors: ReadonlyArray<ComponentProps<typeof ButtonComponent>["color"]> = ["primary","neutral","destructive",+ "neutral-destructive","positive","ghost","dark",diff --git a/packages/design-system/src/components/button.tsx b/packages/design-system/src/components/button.tsxindex 4d6964be32..a7ce17e637 100644--- a/packages/design-system/src/components/button.tsx+++ b/packages/design-system/src/components/button.tsx@@ -20,6 +20,7 @@ const colors = ["ghost","dark","gradient",+ "neutral-destructive",] as const;type ButtonColor = (typeof colors)[number];@@ -29,6 +30,7 @@ type ButtonState = "auto" | "hover" | "focus" | "pressed" | "pending";const backgrounds: Record<ButtonColor, string> = {primary: theme.colors.backgroundPrimary,neutral: theme.colors.backgroundNeutralMain,+ "neutral-destructive": theme.colors.backgroundNeutralMain,destructive: theme.colors.backgroundDestructiveMain,positive: theme.colors.backgroundSuccessMain,ghost: theme.colors.backgroundHover,@@ -39,6 +41,7 @@ const backgrounds: Record<ButtonColor, string> = {const foregrounds: Record<ButtonColor, string> = {primary: theme.colors.foregroundContrastMain,destructive: theme.colors.foregroundContrastMain,+ "neutral-destructive": theme.colors.foregroundDestructive,positive: theme.colors.foregroundContrastMain,neutral: theme.colors.foregroundMain,ghost: theme.colors.foregroundMain,@@ -106,6 +109,7 @@ const StyledButton = styled("button", {color: {primary: perColorStyle("primary"),destructive: perColorStyle("destructive"),+ "neutral-destructive": perColorStyle("neutral-destructive"),positive: perColorStyle("positive"),neutral: perColorStyle("neutral"),ghost: perColorStyle("ghost"),