Browse Source

Merge pull request #295 from meriadec/buttons

Put back correct style on buttons
master
Meriadec Pillet 7 years ago
committed by GitHub
parent
commit
54d6c9b403
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      src/components/base/Button/index.js

24
src/components/base/Button/index.js

@ -12,27 +12,27 @@ import fontFamily from 'styles/styled/fontFamily'
const buttonStyles = {
primary: {
default: p => `
background: ${p.disabled ? p.theme.colors.lightFog : p.theme.colors.wallet};
background: ${p.disabled ? `${p.theme.colors.lightFog} !important` : p.theme.colors.wallet};
color: ${p.disabled ? p.theme.colors.grey : p.theme.colors.white};
`,
hover: p => `
background: ${darken(p.theme.colors.wallet, 0.05)};
`,
background: ${lighten(p.theme.colors.wallet, 0.05)};
`,
active: p => `
background: ${darken(p.theme.colors.wallet, 0.05)};
`,
background: ${darken(p.theme.colors.wallet, 0.1)};
`,
},
danger: {
default: p => `
background: ${p.disabled ? p.theme.colors.lightFog : p.theme.colors.alertRed};
background: ${p.disabled ? `${p.theme.colors.lightFog} !important` : p.theme.colors.alertRed};
color: ${p.disabled ? p.theme.colors.grey : p.theme.colors.white};
`,
hover: p => `
background: ${lighten(p.theme.colors.alertRed, 0.2)};
`,
background: ${lighten(p.theme.colors.alertRed, 0.1)};
`,
active: p => `
background: ${lighten(p.theme.colors.alertRed, 0.2)};
`,
background: ${darken(p.theme.colors.alertRed, 0.1)};
`,
},
outline: {
default: p => `
@ -87,8 +87,8 @@ const Base = styled.button.attrs({
outline: none;
${p => getStyles(p, 'default')};
&:hover,
&:focus {
&:hover {
${p => getStyles(p, 'hover')};
}
&:active {

Loading…
Cancel
Save