forked from bukinoshita/secret
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b0ed683
commit 3dd6d65
Showing
4 changed files
with
70 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
'use strict' | ||
|
||
import React from 'react' | ||
|
||
import { colors, typography } from './../theme' | ||
|
||
const Button = ({ children, type, onClick, disabled }) => { | ||
return ( | ||
<button type={type} onClick={onClick} disabled={disabled}> | ||
{children} | ||
|
||
<style jsx>{` | ||
button { | ||
display: inline-block; | ||
background-color: ${colors.white}; | ||
color: ${colors.black}; | ||
border: 0; | ||
border-radius: 0; | ||
padding: 12px 80px; | ||
font-size: ${typography.f10}; | ||
text-transform: uppercase; | ||
font-weight: ${typography.bold}; | ||
margin: 30px auto; | ||
text-align: center; | ||
cursor: pointer; | ||
outline: none; | ||
letter-spacing: 2px; | ||
transition: all 200ms; | ||
} | ||
button:focus, | ||
button:hover { | ||
box-shadow: 0 4px 20px rgba(255, 255, 255, 0.5); | ||
} | ||
button[disabled] { | ||
background-color: ${colors.gray}; | ||
cursor: default; | ||
} | ||
`}</style> | ||
</button> | ||
) | ||
} | ||
|
||
Button.defaultProps = { | ||
onClick: null, | ||
type: 'button', | ||
disabled: false | ||
} | ||
|
||
export default Button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters