Skip to content

Commit

Permalink
Fix object rest destructuring in Button (missing in #68)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegohaz committed Feb 14, 2017
1 parent b712e93 commit 4bb7ca9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/atoms/Button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ const StyledLink = styled(({ disabled, transparent, reverse, palette, height, th
const Anchor = styled.a`${styles}`
const StyledButton = styled.button`${styles}`

const Button = ({ type, ...props, to, href }) => {
if (to) {
const Button = ({ type, ...props }) => {
if (props.to) {
return <StyledLink {...props} />
} else if (href) {
} else if (props.href) {
return <Anchor {...props} />
}
return <StyledButton {...props} type={type} />
Expand Down

0 comments on commit 4bb7ca9

Please sign in to comment.