From 2c92063c760aa6f69bd685a17809f513006fd8ad Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 6 Mar 2020 20:50:15 +0100 Subject: [PATCH] ADD gray button --- lib/components/src/Button/Button.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/components/src/Button/Button.tsx b/lib/components/src/Button/Button.tsx index 40d7d196517..22e15a04bd5 100644 --- a/lib/components/src/Button/Button.tsx +++ b/lib/components/src/Button/Button.tsx @@ -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( ...(small ? { padding: 9 } : { padding: 12 }), } : {}, - ({ theme, primary, secondary }) => { + ({ theme, primary, secondary, gray }) => { let color; if (primary) { @@ -87,11 +88,14 @@ const ButtonWrapper = styled.button( 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),