UNPKG

monday-ui-react-core

Version:

Official monday.com UI resources for application development in React.js

62 lines (61 loc) 1.8 kB
import { FC } from "react"; import VibeComponentProps from "../../../types/VibeComponentProps"; import { ElementContent } from "src/types/ElementContent"; import { SubIcon } from "../../../types/SubIcon"; interface BaseModalHeaderProps extends VibeComponentProps { /** * Description of the modal - pure string description is a recommended standard, use JSX ability only if there is a need to add links */ description?: ElementContent; /** * Icon to be rendered before the title */ icon?: SubIcon; /** * Class name for the wrapper */ className?: string; /** * Class name for the title */ titleClassName?: string; /** * closes the Modal. No need to provide it, it is being provided by the modal */ closeModal?: () => void; /** /** * ID for the title, needed for accessibility. No need to provide it, it is being provided by the modal */ id?: string; /** * Class name for the description */ descriptionClassName?: string; /** * Size of the icon */ iconSize?: number; /** * class name for the icon */ iconClassName?: string; /** * Aria label for the close button */ closeButtonAriaLabel?: string; /** * @deprecated */ hideCloseButton?: boolean; } interface ModalHeaderWithOnlyTitle extends BaseModalHeaderProps { title: ElementContent; children?: never; } interface ModalHeaderWithOnlyChildren extends BaseModalHeaderProps { title?: never; children: ElementContent; } export type ModalHeaderProps = ModalHeaderWithOnlyTitle | ModalHeaderWithOnlyChildren; declare const ModalHeader: FC<ModalHeaderProps>; export default ModalHeader;