Skip to content

Commit

Permalink
Added dark variant to Button (#19957)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Berger committed Dec 2, 2022
1 parent 885507f commit e532d7b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
15 changes: 15 additions & 0 deletions airbyte-webapp/src/components/ui/Button/Button.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,21 @@
}
}

&.typeDark {
background-color: colors.$dark-blue;
color: colors.$white;

&:hover {
background-color: colors.$dark-blue-800;
color: colors.$white;
}

&:active {
background-color: colors.$dark-blue-1000;
color: colors.$white;
}
}

&.isLoading {
position: relative;
align-content: center;
Expand Down
1 change: 1 addition & 0 deletions airbyte-webapp/src/components/ui/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>((props, r
[styles.typeLight]: variant === "light",
[styles.typePrimary]: variant === "primary",
[styles.typeSecondary]: variant === "secondary",
[styles.typeDark]: variant === "dark",
};
const widthStyle: { width?: string } = {};
if (width) {
Expand Down
6 changes: 6 additions & 0 deletions airbyte-webapp/src/components/ui/Button/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,9 @@ Clear.args = {
variant: "clear",
children: "No Stroke",
};

export const Dark = Template.bind({});
Dark.args = {
variant: "dark",
children: "Dark",
};
2 changes: 1 addition & 1 deletion airbyte-webapp/src/components/ui/Button/types.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";

type ButtonSize = "xs" | "sm" | "lg";
type ButtonVariant = "primary" | "secondary" | "danger" | "light" | "clear";
type ButtonVariant = "primary" | "secondary" | "danger" | "light" | "clear" | "dark";

export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
clickable?: boolean;
Expand Down

0 comments on commit e532d7b

Please sign in to comment.