Skip to content

Commit

Permalink
Merge pull request #99 from diegohaz/fix/button-rest-destructuring
Browse files Browse the repository at this point in the history
Fix object rest destructuring in Button
  • Loading branch information
diegohaz authored Feb 14, 2017
2 parents b712e93 + 4bb7ca9 commit 19ac506
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 19ac506

Please sign in to comment.