@medalsocial/meda
Version:
Shared Meda UI shell and runtime package.
17 lines (16 loc) • 869 B
JavaScript
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { cn } from '../lib/utils.js';
const layoutClass = {
workspace: 'w-full max-w-[1280px] px-4 py-6 sm:px-6 lg:px-8',
centered: 'mx-auto w-full max-w-2xl px-4 py-6 sm:px-6',
fullbleed: 'w-full',
};
export function ShellMain({ layout = 'workspace', className, children }) {
return (_jsx("main", { "data-meda-shell-main-layout": layout, className: cn(
// `flex flex-col` is required so full-height content regions (pages that
// use `flex-1` to fill the main area) get a flex-column parent with a
// definite height. Without it, those regions collapse and clip their
// content (e.g. the Posts list rendered but stayed blank).
'flex flex-col flex-1 min-w-0 overflow-y-auto bg-shell-main', layoutClass[layout], className), children: children }));
}