UNPKG

@navikt/ds-react

Version:

React components from the Norwegian Labour and Welfare Administration.

25 lines (24 loc) 790 B
import React from "react"; interface BaseAlertTitleProps extends React.HTMLAttributes<HTMLHeadingElement> { children: React.ReactNode; /** * Changes the HTML element used for the title. * @default "h2" */ as?: "h2" | "h3" | "h4" | "h5" | "h6" | "div"; } /** * Title component for BaseAlert. Remember to use correct heading-level with the `as` prop. * @see 🏷️ {@link BaseAlertTitleProps} * @example * ```jsx * <BaseAlert> * <BaseAlert.Header> * <BaseAlert.Title as="h2">Info title</BaseAlert.Title> * </BaseAlert.Header> * </BaseAlert> * ``` */ declare const BaseAlertTitle: React.ForwardRefExoticComponent<BaseAlertTitleProps & React.RefAttributes<HTMLHeadingElement>>; export { BaseAlertTitle }; export type { BaseAlertTitleProps };