Skip to content

Commit

Permalink
feat(Button): add extraSmall size
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiazom committed Oct 31, 2024
1 parent 3a667ae commit 19be082
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/buttons/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from "react";
import styles from "./button.module.css";

type ButtonType = "primary" | "secondary";
type ButtonSize = "large" | "small";
type ButtonSize = "large" | "small" | "extraSmall";

interface IButton {
size?: ButtonSize;
Expand All @@ -18,6 +18,7 @@ interface IButton {
const sizeClassMap: { [key in ButtonSize]: string } = {
large: styles.large,
small: styles.small,
extraSmall: styles.extraSmall,
};

const typeClassMap: { [key in ButtonType]: string } = {
Expand Down
11 changes: 11 additions & 0 deletions src/components/buttons/button.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@
}
}

.extraSmall {
composes: button;
padding: 0.375rem 1.25rem;
font-size: 1rem;
font-weight: 400;

@media (min-width: 1024px) {
font-size: 1.125rem;
}
}

.primary {
background: var(--primary-dark);
color: var(--primary-white);
Expand Down

0 comments on commit 19be082

Please sign in to comment.