mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
Fix button props
This commit is contained in:
parent
b93159b9a4
commit
c77b681a89
@ -1,6 +1,6 @@
|
||||
{
|
||||
"languages": ["en", "fr"],
|
||||
"plugins": {
|
||||
"ports": [3000]
|
||||
"ports": [3000, 5000, 8000]
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,11 @@ import cn from 'classnames';
|
||||
import styles from './styles.scss';
|
||||
|
||||
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) {
|
||||
return (
|
||||
<button
|
||||
@ -28,7 +33,7 @@ function Button(props) {
|
||||
|
||||
)}
|
||||
disabled
|
||||
{...props}
|
||||
{...buttonProps}
|
||||
>
|
||||
<div className={styles.saving}>
|
||||
<span>.</span><span>.</span><span>.</span>
|
||||
@ -51,7 +56,7 @@ function Button(props) {
|
||||
props.className,
|
||||
)}
|
||||
type={props.type || 'button'}
|
||||
{...props}
|
||||
{...buttonProps}
|
||||
>
|
||||
{label}
|
||||
</button>
|
||||
|
Loading…
x
Reference in New Issue
Block a user