add option to set leftMargin

This commit is contained in:
Matthias Mair 2024-08-20 19:12:17 +02:00
parent 5515e0762e
commit a2a53d5d66
No known key found for this signature in database
GPG Key ID: A593429DDA23B66A
2 changed files with 5 additions and 2 deletions

View File

@ -46,6 +46,7 @@ export type PanelProps = {
selectedPanel?: string; selectedPanel?: string;
onPanelChange?: (panel: string) => void; onPanelChange?: (panel: string) => void;
collapsible?: boolean; collapsible?: boolean;
ml?: string;
}; };
function BasePanelGroup({ function BasePanelGroup({
@ -53,7 +54,8 @@ function BasePanelGroup({
panels, panels,
onPanelChange, onPanelChange,
selectedPanel, selectedPanel,
collapsible = true collapsible = true,
ml = ''
}: Readonly<PanelProps>): ReactNode { }: Readonly<PanelProps>): ReactNode {
const location = useLocation(); const location = useLocation();
const navigate = useNavigate(); const navigate = useNavigate();
@ -117,7 +119,7 @@ function BasePanelGroup({
return ( return (
<Boundary label={`PanelGroup-${pageKey}`}> <Boundary label={`PanelGroup-${pageKey}`}>
<Paper p="sm" radius="xs" shadow="xs"> <Paper p="sm" radius="xs" shadow="xs" ml={ml}>
<Tabs value={panel} orientation="vertical" keepMounted={false}> <Tabs value={panel} orientation="vertical" keepMounted={false}>
<Tabs.List justify="left"> <Tabs.List justify="left">
{panels.map( {panels.map(

View File

@ -228,6 +228,7 @@ export default function AdminCenter() {
pageKey="admin-center" pageKey="admin-center"
panels={adminCenterPanels} panels={adminCenterPanels}
collapsible={true} collapsible={true}
ml={'sm'}
/> />
</Stack> </Stack>
) : ( ) : (