35 lines
805 B
TypeScript
35 lines
805 B
TypeScript
|
|
import type { CSSProperties, ReactNode } from "react";
|
||
|
|
|
||
|
|
interface WorkspacePageShellProps {
|
||
|
|
title: string;
|
||
|
|
headerRight?: ReactNode;
|
||
|
|
fullWidth?: boolean;
|
||
|
|
className?: string;
|
||
|
|
style?: CSSProperties;
|
||
|
|
children: ReactNode;
|
||
|
|
}
|
||
|
|
|
||
|
|
function WorkspacePageShell({
|
||
|
|
title,
|
||
|
|
headerRight,
|
||
|
|
fullWidth,
|
||
|
|
className,
|
||
|
|
style,
|
||
|
|
children,
|
||
|
|
}: WorkspacePageShellProps) {
|
||
|
|
return (
|
||
|
|
<section
|
||
|
|
className={`workspace-page-shell${fullWidth ? " workspace-page-shell--full" : ""}${
|
||
|
|
className ? ` ${className}` : ""
|
||
|
|
}`}
|
||
|
|
style={style}
|
||
|
|
aria-label={title}
|
||
|
|
>
|
||
|
|
{headerRight ? <div className="workspace-page-shell__actions">{headerRight}</div> : null}
|
||
|
|
<main className="workspace-page-shell__content">{children}</main>
|
||
|
|
</section>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
export default WorkspacePageShell;
|