Change to absolute

This commit is contained in:
mickr777
2023-06-02 14:59:10 +10:00
committed by GitHub
parent 8ae1eaaccc
commit 2bdb655375

View File

@ -45,38 +45,52 @@ export default function InvokeButton(props: InvokeButton) {
return ( return (
<Box style={{ flexGrow: 4 }} position="relative"> <Box style={{ flexGrow: 4 }} position="relative">
{iconButton ? ( <Box style={{ position: 'relative' }}>
<IAIIconButton {iconButton ? (
aria-label={t('parameters.invoke')} <IAIIconButton
type="submit" aria-label={t('parameters.invoke')}
icon={<FaPlay />} type="submit"
isDisabled={!isReady} icon={<FaPlay />}
onClick={handleInvoke} isDisabled={!isReady}
flexGrow={1} onClick={handleInvoke}
w="100%" flexGrow={1}
tooltip={t('parameters.invoke')} w="100%"
tooltipProps={{ placement: 'bottom' }} tooltip={t('parameters.invoke')}
colorScheme="accent" tooltipProps={{ placement: 'bottom' }}
id="invoke-button" colorScheme="accent"
{...rest} id="invoke-button"
/> {...rest}
) : ( />
<IAIButton ) : (
aria-label={t('parameters.invoke')} <IAIButton
type="submit" aria-label={t('parameters.invoke')}
isDisabled={!isReady} type="submit"
onClick={handleInvoke} isDisabled={!isReady}
flexGrow={1} onClick={handleInvoke}
w="100%" flexGrow={1}
colorScheme="accent" w="100%"
id="invoke-button" colorScheme="accent"
fontWeight={700} id="invoke-button"
{...rest} fontWeight={700}
> {...rest}
Invoke >
</IAIButton> Invoke
)} </IAIButton>
{!isReady && <ProgressBar />} )}
{!isReady && (
<Box
style={{
position: 'absolute',
bottom: '0',
left: '0',
right: '0',
zIndex: 1,
}}
>
<ProgressBar />
</Box>
)}
</Box>
</Box> </Box>
); );
} }