UNPKG

@intility/bifrost-react

Version:

React library for Intility's design system, Bifrost.

33 lines (32 loc) 1.56 kB
import type { IconProp } from "@fortawesome/fontawesome-svg-core"; import type { PropsFor } from "../../types.js"; export type MessageState = MessageProps["state"]; export type MessageProps = PropsFor<"div", { /** Message title, displayed with an icon */ header?: React.ReactNode; /** Available states: `default`, `success`, `warning`, `brand`, `chill`,`alert`, `attn`, and `neutral` */ state?: "default" | "success" | "warning" | "alert" | "brand" | "attn" | "chill" | "neutral"; /** Font Awesome icon reference (or string if using library) */ icon?: IconProp; /** Prevents default icon from being displayed */ noIcon?: boolean; /** Attention-grabbing one-line message */ statusBar?: boolean; /** Removes padding from expandable content */ noPadding?: boolean; /** Close button event handler, the close button is only rendered when this is supplied */ onClose?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void; /** If true places children inside dropdown, requires header to be present */ expandable?: boolean; /** Function triggered when clicking on header */ onHeaderClick?: () => void; /** Boolean indicating if message is open or not */ isOpen?: boolean; /** Render children even when `<Message expandable>` is closed. (default `false`) */ eager?: boolean; }>; /** * Display a highlighted message */ declare const Message: import("react").ForwardRefExoticComponent<MessageProps & import("react").RefAttributes<HTMLDivElement>>; export default Message;