import { PropsWithChildren } from 'react'; import { IoAlertCircle, IoWarning } from 'react-icons/io5'; import { cx } from '../../utils/styleUtils'; import style from './Info.module.scss'; interface InfoProps { className?: string; type?: 'info' | 'warning' | 'error'; } interface InfoSectionProps { className?: string; } function InfoTitle({ className, children }: PropsWithChildren) { return

{children}

; } function InfoBody({ className, children }: PropsWithChildren) { return

{children}

; } function InfoFooter({ className, children }: PropsWithChildren) { return
{children}
; } function InfoRoot({ className, type = 'info', children }: PropsWithChildren) { return (
{type === 'info' && } {type === 'warning' && } {type === 'error' && }
{children}
); } const Info = Object.assign(InfoRoot, { Title: InfoTitle, Body: InfoBody, Footer: InfoFooter, }); export default Info;