Skip to content

Commit

Permalink
feat: New Caution button variant (#1096)
Browse files Browse the repository at this point in the history
Co-authored-by: JonnCh <[email protected]>
  • Loading branch information
JonnCharpentier and JonnCh authored Dec 13, 2024
1 parent 1e66f85 commit d0d9076
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,14 @@ const variantStyles: (contrast: boolean) => Record<
focusStyles: Css.bshDanger.if(contrast).boxShadow(`0 0 0 2px ${Palette.White}`).$,
},

caution: {
baseStyles: Css.bgYellow200.gray900.$,
hoverStyles: Css.bgYellow300.$,
pressedStyles: Css.bgYellow400.$,
disabledStyles: Css.bgYellow200.if(contrast).bgYellow900.white.$,
focusStyles: Css.bshDanger.if(contrast).boxShadow(`0 0 0 2px ${Palette.White}`).$,
},

text: {
baseStyles: Css.blue700.add("fontSize", "inherit").if(contrast).blue400.$,
hoverStyles: Css.blue600.if(contrast).blue300.$,
Expand Down Expand Up @@ -217,6 +225,7 @@ export type ButtonVariant =
| "secondary"
| "tertiary"
| "tertiaryDanger"
| "caution"
| "danger"
| "text"
| "textSecondary";

0 comments on commit d0d9076

Please sign in to comment.