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