import React, { useId } from "react";
import { Box, Typography } from "@mui/material";
// Opt-in widths: the shell owns gutters; consumers must not add a second page gutter.
export type PageWidth = "reading" | "data" | "editor";
type HeaderProps = {
title: string;
description?: string;
actions?: React.ReactNode;
level?: "h1" | "h2" | "h3";
titleId?: string;
};
export function PageHeader({ title, description, actions, level = "h1", titleId }: HeaderProps) {
return (
{title}
{description ?
{description}
: null}
{actions ? *": { maxWidth: "100%", whiteSpace: "normal", overflowWrap: "anywhere" } }}>
{actions}
: null}
);
}
// Presentation only: domain components keep their loading, draft and mutation owners.
export function PageSection({ title, description, actions, children, level = "h2", surface = false }: Omit & {
children?: React.ReactNode;
level?: "h2" | "h3";
surface?: boolean;
}) {
const titleId = useId();
return (
{children ? {children} : null}
);
}