Skip to content

Commit

Permalink
feat: outline
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanOliveiraM committed Mar 1, 2023
1 parent 2157b8d commit 8585949
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"react",
"typescript"
],
"version": "2.1.17",
"version": "2.1.18",
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm.js",
"types": "./dist/index.d.ts",
Expand Down
30 changes: 24 additions & 6 deletions src/components/atoms/Button/Button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ const colorModeVariant = getVariant<ButtonProps, ColorModeVariants>({
`

default:
return css``
return css`
background-color: systemPrimary;
color: systemWhite;
`
}
},
danger: ({ variant }) => {
Expand All @@ -124,7 +127,10 @@ const colorModeVariant = getVariant<ButtonProps, ColorModeVariants>({
`

default:
return css``
return css`
background-color: systemDanger;
color: systemWhite;
`
}
},
warning: ({ variant }) => {
Expand All @@ -148,7 +154,10 @@ const colorModeVariant = getVariant<ButtonProps, ColorModeVariants>({
`

default:
return css``
return css`
background-color: systemWarning;
color: systemWhite;
`
}
},
safe: ({ variant }) => {
Expand All @@ -172,7 +181,10 @@ const colorModeVariant = getVariant<ButtonProps, ColorModeVariants>({
`

default:
return css``
return css`
background-color: systemSafe;
color: systemWhite;
`
}
},
},
Expand Down Expand Up @@ -209,11 +221,11 @@ const disabledStyleResolver = ({ disabled, variant }: ButtonProps) => {
case 'ghost':
return css`
background-color: transparent;
box-shadow: none;
&:hover,
&:active {
box-shadow: rgba(0, 0, 0, 0.1) 0px 7px 8px -4px,
rgba(0, 0, 0, 0.02) 0px 12px 17px 2px;
box-shadow: none;
}
`

Expand Down Expand Up @@ -275,6 +287,12 @@ const Button = styled.buttonBox<ButtonProps>`
rgba(0, 0, 0, 0.12) 0px 3px 14px 2px;
}
&:focus {
outline-width: 1px !important;
outline-style: solid !important;
outline-color: systemPrimary !important;
}
${sizeVariant}
${modeVariant}
${colorModeVariant}
Expand Down

0 comments on commit 8585949

Please sign in to comment.