fix(ui): minimize layout shift when overlaying preset prompt preview

This commit is contained in:
psychedelicious 2024-08-14 12:24:57 +10:00
parent 41b2d5d013
commit ddeafc6833

View File

@ -35,14 +35,17 @@ export const ViewModePrompt = ({
onClick={handleExitViewMode} onClick={handleExitViewMode}
justifyContent="space-between" justifyContent="space-between"
h="full" h="full"
paddingRight={3} borderWidth={1}
paddingLeft={3} borderTopWidth={24} // This prevents the prompt from being hidden behind the header
paddingTop={7} borderColor="transparent"
paddingInlineEnd={10}
paddingInlineStart={3}
paddingTop={0}
paddingBottom={3} paddingBottom={3}
> >
<PromptLabel label={label} /> <PromptLabel label={label} />
<Flex overflow="scroll"> <Flex overflow="scroll">
<Text w="full"> <Text w="full" lineHeight="short">
{presetChunks.map((chunk, index) => ( {presetChunks.map((chunk, index) => (
<Text <Text
as="span" as="span"