Skip to content

Commit

Permalink
feat: add negative button skin
Browse files Browse the repository at this point in the history
  • Loading branch information
abelflopes committed Feb 25, 2024
1 parent cc3dbd0 commit 7d8369f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/components/button/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getDisplayName } from "@react-ck/react-utils";
*/
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
/** Defines the color scheme of the button */
skin?: "primary" | "secondary" | "ghost";
skin?: "primary" | "secondary" | "ghost" | "negative";
/** Defines the scale of the button */
size?: "s" | "m";
/**
Expand Down
9 changes: 9 additions & 0 deletions packages/components/button/src/styles/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@
}
}

.negative {
@include define-css-var(button, background-color, get-color(status-negative));
@include define-css-var(button, color, get-color(neutral-light-1));

&:hover {
@include define-css-var(button, background-color, get-color(status-negative-dark));
}
}

.icon {
margin-right: get-spacing(1);
display: inline-flex;
Expand Down

0 comments on commit 7d8369f

Please sign in to comment.