aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/Form/Button.js
blob: 7396ca1b5456c3f28add24dd3637f00ddd21b55f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import styled, {css} from 'styled-components'
import {Border, ButtonLike, DropShadow, Rounded} from "./mixins";

const Base = css`
  ${DropShadow}
  ${Rounded}
  ${ButtonLike}
  margin-right: 2em;
`

const Primary = css`
  ${Base};
  border: none;
  color: ${p => p.theme.colors.background};
  background-color: ${p => p.theme.colors.text};
`
const Secondary = css`
  ${Base};
  ${Border};
  color: ${p => p.theme.colors.text};
  background-color: ${p => p.theme.colors.background};
`

export const Button = styled.button`
  ${p => p.secondary ? css`${Primary}` : css`${Secondary}` }
`

export const SubmitButton = styled.input`
  ${Primary}
`