UNPKG

@wix/design-system

Version:

@wix/design-system

29 lines 1.35 kB
import React from 'react'; import { EllipsisCommonProps } from '../common/Ellipsis'; import { ValuesOf } from '../utils/typeUtils'; import { APPEARANCES, SIZE } from './Heading.constants'; export interface HeadingProps extends Omit<EllipsisCommonProps, 'size'>, React.HTMLAttributes<HTMLHeadingElement> { /** Applies a data-hook HTML attribute that can be used in the tests. */ dataHook?: string; /** Specifies a CSS class name to be appended to the component’s root element. * @internal */ className?: string; /** Invert heading style so it can be used on a dark or image background. */ light?: boolean; /** this prop is deprecated and should not be used * @deprecated */ appearance?: HeadingAppearance; /** Renders the heading as any other given HTML tag */ as?: keyof HTMLElementTagNameMap; /** Controls the heading's visual size and HTML tag appearance. HTML tag can be overridden with ‘as’ prop. */ size?: Size; /** Identifies the element that labels or describes the text element */ id?: string; /** Renders any kind of content within a heading. Usually it’s a text string. */ children?: React.ReactNode; } export type HeadingAppearance = ValuesOf<typeof APPEARANCES>; export type Size = ValuesOf<typeof SIZE>; //# sourceMappingURL=Heading.types.d.ts.map