fix: Do the same without zIndex

This commit is contained in:
blessedcoolant 2023-06-02 17:33:38 +12:00
parent f143fb7254
commit 47301e6f85

View File

@ -46,6 +46,20 @@ export default function InvokeButton(props: InvokeButton) {
return ( return (
<Box style={{ flexGrow: 4 }} position="relative"> <Box style={{ flexGrow: 4 }} position="relative">
<Box style={{ position: 'relative' }}> <Box style={{ position: 'relative' }}>
{!isReady && (
<Box
style={{
position: 'absolute',
bottom: '0',
left: '0',
right: '0',
height: '100%',
overflow: 'clip',
}}
>
<ProgressBar />
</Box>
)}
{iconButton ? ( {iconButton ? (
<IAIIconButton <IAIIconButton
aria-label={t('parameters.invoke')} aria-label={t('parameters.invoke')}
@ -59,7 +73,6 @@ export default function InvokeButton(props: InvokeButton) {
tooltipProps={{ placement: 'bottom' }} tooltipProps={{ placement: 'bottom' }}
colorScheme="accent" colorScheme="accent"
id="invoke-button" id="invoke-button"
zIndex={2}
{...rest} {...rest}
/> />
) : ( ) : (
@ -73,28 +86,12 @@ export default function InvokeButton(props: InvokeButton) {
colorScheme="accent" colorScheme="accent"
id="invoke-button" id="invoke-button"
fontWeight={700} fontWeight={700}
zIndex={2} background={!isReady ? 'none' : 'accent.700'}
{...rest} {...rest}
> >
Invoke Invoke
</IAIButton> </IAIButton>
)} )}
{!isReady && (
<Box
style={{
position: 'absolute',
bottom: '0',
left: '0',
right: '0',
height: '100%',
zIndex: 1,
borderRadius: 4,
overflow: 'clip',
}}
>
<ProgressBar />
</Box>
)}
</Box> </Box>
</Box> </Box>
); );