Skip to content

Commit

Permalink
Add xxs size and subdued color to OuiButtonEmpty
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <miki@amazon.com>
  • Loading branch information
AMoo-Miki committed Oct 14, 2024
1 parent 2ffbb17 commit 122ff49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/button/button_empty/_button_empty.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
font-size: $ouiFontSizeS;
}

&.ouiButtonEmpty--xxSmall {
height: $ouiButtonHeightXSmall;
font-size: $ouiFontSizeXS;
}

&:disabled {
@include ouiButtonContentDisabled;

Expand Down Expand Up @@ -87,6 +92,7 @@ $ouiButtonEmptyTypes: (
ghost: $ouiColorGhost,
text: $ouiTextColor,
success: $ouiColorSecondaryText,
subdued: $ouiTextSubduedColor,
warning: $ouiColorWarningText,
);

Expand Down
3 changes: 3 additions & 0 deletions src/components/button/button_empty/button_empty.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export type OuiButtonEmptyColor =
| 'text'
| 'ghost'
| 'success'
| 'subdued'
| 'warning';

const colorToClassNameMap: { [color in OuiButtonEmptyColor]: string } = {
Expand All @@ -60,12 +61,14 @@ const colorToClassNameMap: { [color in OuiButtonEmptyColor]: string } = {
text: 'ouiButtonEmpty--text',
ghost: 'ouiButtonEmpty--ghost',
success: 'ouiButtonEmpty--success',
subdued: 'ouiButtonEmpty--subdued',
warning: 'ouiButtonEmpty--warning',
};

export const COLORS = keysOf(colorToClassNameMap);

const sizeToClassNameMap = {
xxs: 'ouiButtonEmpty--xxSmall',
xs: 'ouiButtonEmpty--xSmall',
s: 'ouiButtonEmpty--small',
l: 'ouiButtonEmpty--large',
Expand Down

0 comments on commit 122ff49

Please sign in to comment.