import { Megaphone } from 'lucide-react' import { forwardRef, PropsWithChildren, ReactNode } from 'react' import { Badge, Button, 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}
} const PanelNotice = forwardRef< HTMLDivElement, { className?: string | false title?: string description?: string href?: string buttonText?: string } >(({ className, title, description, href, buttonText, ...props }, ref) => { return (
Upcoming change {title} {/* {title} */}
{description && (
{description}
)}
{href && (
)}
) }) PanelNotice.displayName = 'PanelNotice' Panel.Content = Content Panel.Notice = PanelNotice export default Panel