Skip to content

Commit

Permalink
Create Button component
Browse files Browse the repository at this point in the history
  • Loading branch information
TheeDouglasAM3 committed Jan 28, 2021
1 parent 2282ccf commit 5bf6e02
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/components/Button/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import PropTypes from 'prop-types'
import styled from 'styled-components'

const Button = styled.button`
background-color: ${({ theme }) => theme.colors.secondary};
color: ${({ theme }) => theme.colors.contrastText};
border-radius: ${({ theme }) => theme.borderRadius};
border: 0;
width: 100%;
padding: 10px 16px;
font-weight: bold;
font-size: 14px;
line-height: 1;
text-transform: uppercase;
outline: 0;
transition: .3s;
cursor: pointer;
&:hover,
&:focus {
opacity: .7;
}
&:disabled {
background-color: #979797;
cursor: not-allowed;
}
`

Button.propTypes = {
type: PropTypes.oneOf(['submit', 'type', 'button']).isRequired,
children: PropTypes.node.isRequired,
}

export default Button

0 comments on commit 5bf6e02

Please sign in to comment.