Files
omniai-web/src/components/WorkspacePageShell.tsx
T
2026-06-02 12:38:01 +08:00

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;