diff --git a/src/components/shared/detail-page-shell.tsx b/src/components/shared/detail-page-shell.tsx new file mode 100644 index 0000000..4dbad15 --- /dev/null +++ b/src/components/shared/detail-page-shell.tsx @@ -0,0 +1,54 @@ +'use client'; + +import type { ReactNode } from 'react'; + +import { cn } from '@/lib/utils'; + +/** + * Wrapper for entity detail pages (clients, yachts, companies, etc.). Renders: + * - sticky compact header (entity name + status pill) + * - the children (existing tab dropdown selector + tab body) + * - optional sticky bottom action shelf, pinned above the bottom tab bar on + * mobile (`pb-[calc(56px+env(safe-area-inset-bottom))]` content padding). + */ +export function DetailPageShell({ + entityName, + status, + children, + bottomActions, + className, +}: { + entityName: string; + status?: ReactNode; + children: ReactNode; + bottomActions?: ReactNode; + className?: string; +}) { + return ( +
+
+
+

{entityName}

+ {status ?
{status}
: null} +
+
+ +
+ {children} +
+ + {bottomActions ? ( +
+ {bottomActions} +
+ ) : null} +
+ ); +}