Button.tsx 923 B
Newer Older
Andrei Eres's avatar
Andrei Eres committed
import styled from 'styled-components'
import { ThemeProps } from '../types'

export const Button = styled.button`
  display: inline-block;
  background: ${({ theme }: ThemeProps) => theme.buttonBgColor};
  border: none;
  border-radius: 0.2rem;
  color: ${({ theme }: ThemeProps) => theme.buttonTextColor};
  font-size: ${({ theme }: ThemeProps) => theme.fontSize};
Andrei Eres's avatar
Andrei Eres committed
  margin: 0;
  font-family: ${({ theme }: ThemeProps) => theme.fontFamily};
  white-space: nowrap;
  text-decoration: none;
  padding: 0.5rem 1rem;
Andrei Eres's avatar
Andrei Eres committed
  cursor: pointer;
  transition: ${({ theme }: ThemeProps) => theme.transition};

  &:hover {
    background: ${({ theme }: ThemeProps) => theme.buttonBgHoverColor};
  }
Andrei Eres's avatar
Andrei Eres committed

  &.secondary {
    padding: 0.4rem 0;
    color: ${({ theme }: ThemeProps) => theme.fadedTextColor};
    background: none;
  }

  &.secondary:hover {
    color: ${({ theme }: ThemeProps) => theme.mainTextColor};
  }
Andrei Eres's avatar
Andrei Eres committed
`