AuthorizeRejectButtons: swap out icon during action countdown

This commit is contained in:
Alex Gleason 2023-03-27 15:34:02 -05:00
parent 6f705a827e
commit 9367b16200
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -65,7 +65,7 @@ const AuthorizeRejectButtons: React.FC<IAuthorizeRejectButtons> = ({ onAuthorize
return ( return (
<HStack space={3} alignItems='center'> <HStack space={3} alignItems='center'>
<IconButton <IconButton
src={require('@tabler/icons/x.svg')} src={state === 'rejecting' ? require('@tabler/icons/player-stop-filled.svg') : require('@tabler/icons/x.svg')}
onClick={handleReject} onClick={handleReject}
theme='seamless' theme='seamless'
className='h-10 w-10 items-center justify-center border-2 border-danger-600/10 hover:border-danger-600' className='h-10 w-10 items-center justify-center border-2 border-danger-600/10 hover:border-danger-600'
@ -73,7 +73,7 @@ const AuthorizeRejectButtons: React.FC<IAuthorizeRejectButtons> = ({ onAuthorize
disabled={state === 'authorizing'} disabled={state === 'authorizing'}
/> />
<IconButton <IconButton
src={require('@tabler/icons/check.svg')} src={state === 'authorizing' ? require('@tabler/icons/player-stop-filled.svg') : require('@tabler/icons/check.svg')}
onClick={handleAuthorize} onClick={handleAuthorize}
theme='seamless' theme='seamless'
className='h-10 w-10 items-center justify-center border-2 border-primary-500/10 hover:border-primary-500' className='h-10 w-10 items-center justify-center border-2 border-primary-500/10 hover:border-primary-500'