Fix button props

This commit is contained in:
cyril lopez 2017-09-26 09:52:44 +02:00
parent b93159b9a4
commit c77b681a89
2 changed files with 8 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"languages": ["en", "fr"], "languages": ["en", "fr"],
"plugins": { "plugins": {
"ports": [3000] "ports": [3000, 5000, 8000]
} }
} }

View File

@ -13,6 +13,11 @@ import cn from 'classnames';
import styles from './styles.scss'; import styles from './styles.scss';
function Button(props) { function Button(props) {
const buttonProps = Object.assign({}, props);
const propsToDelete = ['loader', 'primary', 'primaryAddShape', 'secondary', 'secondaryHotline', 'secondaryHotlineAdd', 'kind'];
propsToDelete.map((value) => delete buttonProps[value]);
if (props.loader) { if (props.loader) {
return ( return (
<button <button
@ -28,7 +33,7 @@ function Button(props) {
)} )}
disabled disabled
{...props} {...buttonProps}
> >
<div className={styles.saving}> <div className={styles.saving}>
<span>.</span><span>.</span><span>.</span> <span>.</span><span>.</span><span>.</span>
@ -51,7 +56,7 @@ function Button(props) {
props.className, props.className,
)} )}
type={props.type || 'button'} type={props.type || 'button'}
{...props} {...buttonProps}
> >
{label} {label}
</button> </button>