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', 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]}