import { PropsWithChildren, ReactNode } from 'react' import { Loading, cn } from 'ui' interface PanelProps { className?: string footer?: JSX.Element | false loading?: boolean noMargin?: boolean title?: ReactNode | false wrapWithLoading?: boolean noHideOverflow?: boolean titleClasses?: string } function Panel(props: PropsWithChildren) { const content = (
{props.title && (
{props.title}
)} {props.children} {props.footer && (
{props.footer}
)}
) if (props.wrapWithLoading === false) { return content } return {content} } function Content({ children, className }: { children: ReactNode; className?: string | false }) { return
{children}
} Panel.Content = Content export default Panel