mirror of
https://github.com/System-End/site.git
synced 2026-04-19 20:55:09 +00:00
added disabled button to slack page
This commit is contained in:
parent
f755ff88bb
commit
d5afd357ca
1 changed files with 7 additions and 2 deletions
|
|
@ -18,6 +18,10 @@ const bg = {
|
||||||
bg: 'orange',
|
bg: 'orange',
|
||||||
backgroundImage: theme.util.gx('orange', 'red'),
|
backgroundImage: theme.util.gx('orange', 'red'),
|
||||||
boxShadow: `0 0 0 1px ${theme.colors.white}, 0 0 0 4px ${theme.colors.primary}`
|
boxShadow: `0 0 0 1px ${theme.colors.white}, 0 0 0 4px ${theme.colors.primary}`
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
bg: 'gray',
|
||||||
|
backgroundImage: theme.util.gx('gray', 'gray'),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -37,6 +41,7 @@ const Submit = ({
|
||||||
},
|
},
|
||||||
width = '100%',
|
width = '100%',
|
||||||
sx,
|
sx,
|
||||||
|
disabled,
|
||||||
...props
|
...props
|
||||||
}) => (
|
}) => (
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -48,10 +53,10 @@ const Submit = ({
|
||||||
mt: 3,
|
mt: 3,
|
||||||
fontSize: 2,
|
fontSize: 2,
|
||||||
width,
|
width,
|
||||||
...(status === 'submitting' ? submitting : bg[status]),
|
...(disabled ? bg['disabled'] : (status === 'submitting' ? submitting : bg[status])),
|
||||||
...sx
|
...sx
|
||||||
}}
|
}}
|
||||||
disabled={status === 'submitting'}
|
disabled={status === 'submitting' || disabled}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{status === 'submitting' ? 'Submitting…' : labels[status]}
|
{status === 'submitting' ? 'Submitting…' : labels[status]}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue