runloopable / web /src /customer-grid /AppFrame.tsx
fsanyoto's picture
Deploy AIOS web (React glide grid + FastAPI slice)
3fac176 verified
Raw History Blame Contribute Delete
817 Bytes
import type { ReactNode } from "react";
import "../styles/sdlc76/app-frame.css";
interface AppFrameProps {
appName: string;
actions?: ReactNode;
rail?: ReactNode;
children?: ReactNode;
}
export function AppFrame({ appName, actions, rail, children }: AppFrameProps) {
const header = <header className="cg-map-bar cg-app-frame-header">
{rail ? null : <a className="cg-app-frame-back" href="#/app">Back to Apps</a>}
<span className="cg-app-map-name cg-app-frame-name" title={appName} aria-label="App name">
<strong>{appName}</strong>
</span>
{actions}
</header>;
// With a rail, the header and body share one column beside it, and the rail carries the Back.
return rail
? <>{rail}<div className="cg-app-frame-main">{header}{children}</div></>
: <>{header}{children}</>;
}