mirror of
https://github.com/System-End/site.git
synced 2026-04-19 15:18:18 +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',
|
||||
backgroundImage: theme.util.gx('orange', 'red'),
|
||||
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%',
|
||||
sx,
|
||||
disabled,
|
||||
...props
|
||||
}) => (
|
||||
<Button
|
||||
|
|
@ -48,10 +53,10 @@ const Submit = ({
|
|||
mt: 3,
|
||||
fontSize: 2,
|
||||
width,
|
||||
...(status === 'submitting' ? submitting : bg[status]),
|
||||
...(disabled ? bg['disabled'] : (status === 'submitting' ? submitting : bg[status])),
|
||||
...sx
|
||||
}}
|
||||
disabled={status === 'submitting'}
|
||||
disabled={status === 'submitting' || disabled}
|
||||
{...props}
|
||||
>
|
||||
{status === 'submitting' ? 'Submitting…' : labels[status]}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue