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