Skip to content

Commit

Permalink
fix(Button): remove default type
Browse files Browse the repository at this point in the history
  • Loading branch information
ej9x committed Mar 12, 2019
1 parent 8de3275 commit f856f52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/components/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Button extends Component<ButtonProps> {
variant: 'raised',
color: 'primary',
size: 'md',
type: 'button',
tagName: 'button',
};

onClick = (event: *) => {
Expand All @@ -46,13 +46,12 @@ class Button extends Component<ButtonProps> {
}

render() {
const { children, type, loading, ...rest } = this.props;
const { children, tagName, loading, ...rest } = this.props;

return (
<ButtonTag
tagName="button"
{ ...rest }
type={ type }
tagName={ tagName }
loading={ loading }
onClick={ this.onClick }
aria-busy={ Boolean(loading).toString() }
Expand Down
1 change: 0 additions & 1 deletion src/components/Button/Button.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ describe('<Button />', () => {
onClick={[Function]}
size="md"
tagName="button"
type="button"
variant="raised"
>
<span
Expand Down
1 change: 1 addition & 0 deletions src/components/Button/Button.theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const getSquaredStyle = (props: *) => {

const [ButtonTag, theme] = createThemeTag(name, ({ COLORS, SIZES }: *) => ({
root: (props) => ({
appearance: 'none',
outline: 'none',
textAlign: 'center',
textDecoration: 'none',
Expand Down

0 comments on commit f856f52

Please sign in to comment.