import React from 'react'; import classNames from '@lib/class-names/ClassNames'; import { HeadingLevel, PanelContentElementColumnProps, PanelContentElementProps, PanelProps, PanelTitleProps, } from '@lib/plume-admin-theme/panel/PanelProps'; import { Grid, Icon, IconButton } from '@mui/material'; import scss from './panel.module.scss'; export function Panel({ className, children }: Readonly) { return (
{children}
); } export function PanelSeparator() { return
; } export function PanelTitle( { children, level = 'h1', backRoute, }: Readonly, ) { const Level: HeadingLevel = level; return (
{ backRoute && ( } to={backRoute.href} onClick={backRoute.onClick} > arrow_back ) } {children}
); } export function PanelContent({ children, className }: Readonly) { return (
{children}
); } /** * Layout component that wraps a child, handling page disposition * @param children the wrapped component * @param columns number of columns displayed * @param cssClasses optional additional className */ export function PanelContentElement({ children, columns, className, }: Readonly) { return ( {children} ); } /** * Layout component that must be inside a {@link PanelContentElement} or itself, handling page disposition * @param width the width of the column, it depends on the number of columns available * @param children the wrapped component * @param className optional additional className */ export function PanelContentElementColumn({ width, children, className, }: Readonly) { return ( {children} ); }