/** @jsxRuntime classic */ /** @jsx jsx */ import { jsx, useTheme } from '@keystone-ui/core' import { Fragment, type HTMLAttributes, type ReactNode, useState } from 'react' import { MenuIcon, XCircleIcon } from '@keystone-ui/icons' import { Navigation } from './Navigation' import { Logo } from './Logo' type PageContainerProps = { children: ReactNode header: ReactNode title?: string } export const HEADER_HEIGHT = 80 const PageWrapper = (props: HTMLAttributes) => { // const { colors } = useTheme(); return ( {/* TODO: not sure where to put this */}
) } const Sidebar = ({ isSidebarOpen, ...props }: HTMLAttributes & { isSidebarOpen: boolean }) => { // const { colors } = useTheme(); return (
) } const Content = (props: HTMLAttributes) => { const { colors, spacing } = useTheme() return (
) } export const PageContainer = ({ children, header, title }: PageContainerProps) => { const { colors, spacing } = useTheme() const [isSidebarOpen, setIsSidebarOpen] = useState(false) return (
{ setIsSidebarOpen(!isSidebarOpen) }} css={{ display: 'block', '@media (min-width: 576px)': { display: 'none' } }} > {isSidebarOpen ? : }
{title ? `Keystone - ${title}` : 'Keystone'} {header}
{children}
) }