UNPKG

@ui5/webcomponents-react

Version:

React Wrapper for UI5 Web Components and additional components

51 lines (50 loc) 2.21 kB
import '@ui5/webcomponents/dist/Title.js'; import type TitleLevel from '@ui5/webcomponents/dist/types/TitleLevel.js'; import type WrappingType from '@ui5/webcomponents/dist/types/WrappingType.js'; import type { ReactNode } from 'react'; import type { CommonProps, Ui5DomRef } from '../../types/index.js'; interface TitleAttributes { /** * Defines the component level. * Available options are: `"H6"` to `"H1"`. * This property does not influence the style of the component. * Use the property `size` for this purpose instead. * @default "H2" */ level?: TitleLevel | keyof typeof TitleLevel; /** * Defines the visual appearance of the title. * Available options are: `"H6"` to `"H1"`. * @default "H5" */ size?: TitleLevel | keyof typeof TitleLevel; /** * Defines how the text of a component will be displayed when there is not enough space. * * **Note:** for option "Normal" the text will wrap and the words will not be broken based on hyphenation. * @default "Normal" */ wrappingType?: WrappingType | keyof typeof WrappingType; } interface TitleDomRef extends Required<TitleAttributes>, Ui5DomRef { } interface TitlePropTypes extends TitleAttributes, Omit<CommonProps, keyof TitleAttributes | 'children'> { /** * Defines the text of the component. * This component supports nesting a `Link` component inside. * * **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design. */ children?: ReactNode | ReactNode[]; } /** * The `Title` component is used to display titles inside a page. * It is a simple, large-sized text with explicit header/title semantics. * * * * __Note__: This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/) */ declare const Title: import("react").ForwardRefExoticComponent<TitlePropTypes & import("../../internal/withWebComponent.js").WithWebComponentPropTypes & import("react").RefAttributes<TitleDomRef>>; export { Title }; export type { TitleDomRef, TitlePropTypes };