import React, { forwardRef } from "react"; import { BodyLong } from "../../../typography"; import { cl } from "../../../utils/helpers"; import { useBaseAlert } from "../../base-alert/root/BaseAlertRoot.context"; interface InfoCardMessageProps extends React.HTMLAttributes { /** * Icon to display in message. */ icon: React.ReactNode; } /** * A component for displaying informational messages. * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/infocard) * @see 🏷️ {@link InfoCardMessageProps} * @example * ```jsx * * }> * Message contents * * * ``` */ const InfoCardMessage = forwardRef( ( { children, className, icon, ...restProps }: InfoCardMessageProps, forwardedRef, ) => { const context = useBaseAlert(); return (
{icon}
{children}
); }, ); export { InfoCardMessage }; export type { InfoCardMessageProps };