Button.tsx 872 Bytes
Newer Older
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
import styled from 'styled-components'
import { fonts } from 'style/fonts'
import { distance, maxScreenWidthMobile } from 'style/sizes'

const Button = styled.button.attrs({type: 'button'})`
    font-family: ${fonts.default};
    display: block;
    appearance: none;
    background: ${({theme}) => theme.colors.secondary};
    color: ${({theme}) => theme.colors.backgroundSecondary};
    border: none;
    margin-bottom: ${distance.large};
    text-transform: uppercase;
    padding: ${distance.small};
    border-radius: 4px;
    -webkit-appearance: none;
    opacity: ${({disabled}) => disabled ? 0.3 : 1};
    @media screen and (min-width: ${maxScreenWidthMobile}px) {
        &:hover {
            background: ${({theme}) => theme.colors.primary};
            transform: scale(1.05);
        }
    }
    &:active {
        opacity: 0.7;
    }
`

export default Button