Browse Source

Focus state for Button outline

master
meriadec 7 years ago
parent
commit
0b3f75e096
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 26
      src/components/base/Button/index.js

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

@ -69,15 +69,23 @@ const buttonStyles: { [_: string]: Style } = {
`, `,
}, },
outline: { outline: {
default: p => ` default: p => {
background: transparent; const c = p.outlineColor
border: 1px solid ${ ? p.theme.colors[p.outlineColor] || p.outlineColor
p.outlineColor ? p.theme.colors[p.outlineColor] || p.outlineColor : p.theme.colors.wallet : p.theme.colors.wallet
}; return `
color: ${ background: transparent;
p.outlineColor ? p.theme.colors[p.outlineColor] || p.outlineColor : p.theme.colors.wallet border: 1px solid ${c};
}; color: ${c};
`, box-shadow: ${
p.isFocused
? `
0 0 0 1px ${darken(c, 0.3)} inset,
0 0 0 4px ${rgba(c, 0.3)};`
: ''
}
`
},
active: p => ` active: p => `
color: ${darken( color: ${darken(
p.outlineColor ? p.theme.colors[p.outlineColor] || p.outlineColor : p.theme.colors.wallet, p.outlineColor ? p.theme.colors[p.outlineColor] || p.outlineColor : p.theme.colors.wallet,

Loading…
Cancel
Save