added disabled button to slack page

This commit is contained in:
jpt1729 2024-09-17 20:46:17 -05:00
parent f755ff88bb
commit d5afd357ca

View file

@ -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]}