import { Alert as ChakraAlert } from "@chakra-ui/react" import * as React from "react" export interface AlertProps extends Omit { startElement?: React.ReactNode endElement?: React.ReactNode title?: React.ReactNode icon?: React.ReactElement } export const AlertClosedComponent = React.forwardRef< HTMLDivElement, AlertProps >(function Alert(props, ref) { const { title, children, icon, startElement, endElement, ...rest } = props return ( {startElement || {icon}} {children ? ( {title} {children} ) : ( {title} )} {endElement} ) })