2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 11:40:58 +00:00

Tweak expand icon for panels (#9905)

- Better layout
- Add tooltip
- Add divider
This commit is contained in:
Oliver
2025-06-30 13:14:37 +10:00
committed by GitHub
parent 52997d022a
commit 8c6cacae66

View File

@ -269,22 +269,28 @@ function BasePanelGroup({
)} )}
</Box> </Box>
))} ))}
{collapsible && <Divider />}
{collapsible && ( {collapsible && (
<Group wrap='nowrap' gap='xs'> <Group wrap='nowrap' gap='xs'>
<Tooltip
position='right'
label={expanded ? t`Collapse panels` : t`Expand panels`}
>
<ActionIcon <ActionIcon
style={{ style={{
paddingLeft: '10px' paddingLeft: '10px'
}} }}
onClick={() => setExpanded(!expanded)} onClick={() => setExpanded(!expanded)}
variant='transparent' variant='transparent'
size='md' size='lg'
> >
{expanded ? ( {expanded ? (
<IconLayoutSidebarLeftCollapse opacity={0.5} /> <IconLayoutSidebarLeftCollapse opacity={0.75} />
) : ( ) : (
<IconLayoutSidebarRightCollapse opacity={0.5} /> <IconLayoutSidebarRightCollapse opacity={0.75} />
)} )}
</ActionIcon> </ActionIcon>
</Tooltip>
{pluginPanelSet.isLoading && <Loader size='xs' />} {pluginPanelSet.isLoading && <Loader size='xs' />}
</Group> </Group>
)} )}