Browse Source

Update button style

master
meriadec 7 years ago
parent
commit
566830213f
No known key found for this signature in database GPG Key ID: 1D2FC2305E2CB399
  1. 13
      src/components/base/Button/index.js
  2. 2
      src/styles/theme.js

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

@ -7,19 +7,26 @@ import noop from 'lodash/noop'
import { darken, lighten } from 'styles/helpers' import { darken, lighten } from 'styles/helpers'
import fontFamily from 'styles/styled/fontFamily'
import Box from 'components/base/Box' import Box from 'components/base/Box'
import Icon from 'components/base/Icon' import Icon from 'components/base/Icon'
const Base = styled.button` const Base = styled.button.attrs({
ff: 'Museo Sans|Regular',
fontSize: 3,
px: 2,
})`
${space}; ${space};
${color}; ${color};
${fontSize}; ${fontSize};
${fontWeight}; ${fontWeight};
border-radius: 5px; ${fontFamily};
border-radius: 4px;
border: ${p => border: ${p =>
p.primary ? 'none' : `2px solid ${p.disabled ? 'transparent' : p.theme.colors.grey}`}; p.primary ? 'none' : `2px solid ${p.disabled ? 'transparent' : p.theme.colors.grey}`};
cursor: ${p => (p.disabled ? 'default' : 'pointer')}; cursor: ${p => (p.disabled ? 'default' : 'pointer')};
height: 40px; height: 30px;
outline: none; outline: none;
&:hover { &:hover {

2
src/styles/theme.js

@ -1,7 +1,7 @@
// @flow // @flow
export const space = [0, 5, 10, 15, 20, 30, 40, 50, 70] export const space = [0, 5, 10, 15, 20, 30, 40, 50, 70]
export const fontSizes = [8, 9, 10, 11, 13, 16, 18, 22, 32] export const fontSizes = [8, 9, 10, 12, 13, 16, 18, 22, 32]
export const radii = [0, 4] export const radii = [0, 4]
export const shadows = ['0 4px 8px 0 rgba(0, 0, 0, 0.03)'] export const shadows = ['0 4px 8px 0 rgba(0, 0, 0, 0.03)']

Loading…
Cancel
Save