Skip to content

Commit

Permalink
Merge pull request #4 from jesstelford/patch-2
Browse files Browse the repository at this point in the history
Only pass required props to inner button container
  • Loading branch information
Temzasse authored Dec 30, 2017
2 parents fa0f027 + 6761f4e commit 347c23c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,17 @@ const rippleStyles = {
display: 'block',
};

const Button = ({ children, ...rest }) => (
<ButtonWrapper {...rest}
>
<ButtonContent {...rest} wrapperStyles={rippleStyles}>
{children}
</ButtonContent>
</ButtonWrapper>
);
const Button = ({ children, ...rest }) => {
const { disabled, small, large, className } = rest;
return (
<ButtonWrapper {...rest}
>
<ButtonContent {...{ disabled, small, large, className }} wrapperStyles={rippleStyles}>
{children}
</ButtonContent>
</ButtonWrapper>
);
}

Button.propTypes = {
children: PropTypes.any,
Expand Down

0 comments on commit 347c23c

Please sign in to comment.