Add ScrollArea to InputContexts component

- Wrapped the content of the Accordion.Panel in a ScrollArea component.
- This change allows the content to be scrollable when it exceeds the panel's height.
This commit is contained in:
Rankin Zheng 2023-08-30 11:27:07 +08:00
parent c7fd90ca8a
commit 37fdc93b2f

View File

@ -81,13 +81,15 @@ const InputContexts = observer(() => {
</ActionIcon>
</Box>
<Accordion.Panel>
{
content
? <pre style={{ overflowWrap: 'normal', fontSize: 'var(--vscode-editor-font-size)', margin: 0 }}>{content}</pre>
: <Center>
<Text c='gray.3'>No content</Text>
</Center>
}
<ScrollArea type="auto">
{
content
? <pre style={{ overflowWrap: 'normal', fontSize: 'var(--vscode-editor-font-size)', margin: 0 }}>{content}</pre>
: <Center>
<Text c='gray.3'>No content</Text>
</Center>
}
</ScrollArea>
</Accordion.Panel>
</Accordion.Item>
);