ADD gray button

This commit is contained in:
Norbert de Langen 2020-03-06 20:50:15 +01:00
parent 0fad41972d
commit 2c92063c76
No known key found for this signature in database
GPG Key ID: 976651DA156C2825

View File

@ -7,6 +7,7 @@ export interface ButtonProps {
primary?: boolean;
secondary?: boolean;
tertiary?: boolean;
gray?: boolean;
inForm?: boolean;
disabled?: boolean;
small?: boolean;
@ -78,7 +79,7 @@ const ButtonWrapper = styled.button<ButtonWrapperProps>(
...(small ? { padding: 9 } : { padding: 12 }),
}
: {},
({ theme, primary, secondary }) => {
({ theme, primary, secondary, gray }) => {
let color;
if (primary) {
@ -87,11 +88,14 @@ const ButtonWrapper = styled.button<ButtonWrapperProps>(
if (secondary) {
color = theme.color.secondary;
}
if (gray) {
color = theme.color.medium;
}
return color
? {
background: color,
color: theme.color.lightest,
color: gray ? '#333333' : theme.color.inverseText,
'&:hover': {
background: darken(0.05, color),