Javi Velasco 2016-11-22 16:44:47 +01:00
parent b6610cd3b3
commit fb52c00a14
2 changed files with 8 additions and 4 deletions

View File

@ -52,7 +52,8 @@ const factory = (ripple, FontIcon) => {
mini: false,
neutral: true,
primary: false,
raised: false
raised: false,
type: 'button'
};
handleMouseUp = (event) => {
@ -67,7 +68,7 @@ const factory = (ripple, FontIcon) => {
render () {
const { accent, children, className, flat, floating, href, icon,
inverse, label, mini, neutral, primary, theme, raised, ...others} = this.props;
inverse, label, mini, neutral, primary, theme, type, raised, ...others} = this.props;
const element = href ? 'a' : 'button';
const level = primary ? 'primary' : accent ? 'accent' : 'neutral';
const shape = flat ? 'flat' : raised ? 'raised' : floating ? 'floating' : 'flat';
@ -86,6 +87,7 @@ const factory = (ripple, FontIcon) => {
disabled: this.props.disabled,
onMouseUp: this.handleMouseUp,
onMouseLeave: this.handleMouseLeave,
type: !href ? type : null,
'data-react-toolbox': 'button'
};

View File

@ -30,7 +30,8 @@ const factory = (ripple, FontIcon) => {
accent: false,
className: '',
neutral: true,
primary: false
primary: false,
type: 'button'
};
handleMouseUp = (event) => {
@ -45,7 +46,7 @@ const factory = (ripple, FontIcon) => {
render () {
const {accent, children, className, href, icon, inverse, neutral,
primary, theme, ...others} = this.props;
primary, theme, type, ...others} = this.props;
const element = href ? 'a' : 'button';
const level = primary ? 'primary' : accent ? 'accent' : 'neutral';
const classes = classnames([theme.toggle], {
@ -61,6 +62,7 @@ const factory = (ripple, FontIcon) => {
disabled: this.props.disabled,
onMouseUp: this.handleMouseUp,
onMouseLeave: this.handleMouseLeave,
type: !href ? type : null,
'data-react-toolbox': 'button'
};