Skip to content

Commit

Permalink
feat(Button): add size tiny
Browse files Browse the repository at this point in the history
  • Loading branch information
Carolinevp committed Nov 29, 2022
1 parent 904e04a commit e08fe0d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Button/Button.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ export interface ButtonProps
*/
small?: boolean

/**
* Tiny size
*/
tiny?: boolean

/**
* @ignore
*/
Expand Down
11 changes: 11 additions & 0 deletions src/Button/Button.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ export const ButtonContainer = styled.button`
}
}
&[data-tiny='true'] {
font-size: ${fontScale.asteroid.size}px;
padding: 0 12px;
--button-height: 36px;
--button-side-element-margin: 8px;
& ${SideElementContainer} {
font-size: 20px;
}
}
&[data-mode='${ButtonModes.solid}'] {
background-color: ${theme.color('primary', { dynamic: true })};
color: ${theme.color('primary', {
Expand Down
2 changes: 2 additions & 0 deletions src/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const InnerButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
ghost = false,
link = false,
small = false,
tiny = false,
fullWidth = false,
dangerouslySetInnerHTML,
type = 'button',
Expand Down Expand Up @@ -49,6 +50,7 @@ const InnerButton = React.forwardRef<HTMLButtonElement, ButtonProps>(
data-loading={loading}
data-mode={mode}
data-small={small}
data-tiny={tiny}
data-full-width={fullWidth}
type={type}
{...rest}
Expand Down

0 comments on commit e08fe0d

Please sign in to comment.