UNPKG

react-tailwind-component-library

Version:
74 lines 2.32 kB
import React from 'react'; import PropTypes from 'prop-types'; import * as icons from '../../icons'; export declare const VALID_TAGS: readonly ["h1", "h2", "h3", "h4", "h5", "h6", "p", "span", "div"]; export declare const TEXT_VARIANTS: readonly ["hero", "display", "heading", "body"]; export declare const TEXT_WEIGHTS: readonly ["bold", "medium", "regular", "light"]; export declare const TEXT_SIZES: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9]; export interface ITextProps { /** * Defines whether the text is displayed as hero, display, heading, or body * @default body */ variant?: typeof TEXT_VARIANTS[number]; /** * Defines whether the text is regular, bold, medium, or light * @default regular */ weight?: typeof TEXT_WEIGHTS[number]; /** * Defines size of text, with 1 being the largest and 9 being the smallest * @default 1 */ size?: typeof TEXT_SIZES[number]; } export declare const textPropTypes: { variant: PropTypes.Requireable<"body" | "display" | "heading" | "hero">; weight: PropTypes.Requireable<"bold" | "light" | "medium" | "regular">; size: PropTypes.Requireable<5 | 6 | 4 | 1 | 3 | 2 | 9 | 7 | 8>; }; export declare const ICON_COLORS: readonly ["inherit", "default", "highlight", "white", "brand", "success", "error", "info"]; export interface IconProps extends ITextProps { /** * Defines title for the icon * @default "" */ title?: string; /** * Defines the icon to be displayed */ name: keyof typeof icons; /** * Lets the icon inherit inline classes * @default "" */ className?: string; /** * To customise height of the icon */ height?: number; /** * To customise width of the icon */ width?: number; /** * Defines color of the icon, use inherit to use custom className * @default default */ color?: typeof ICON_COLORS[number]; /** * Defines alternate text (for screen readers) */ alt?: string; /** * Defines the handler been called when the icon is clicked */ onClick?: () => void; /** * Attributes to Cypress integration */ 'data-cy'?: string; } declare const Icon: React.FC<IconProps>; export default Icon; //# sourceMappingURL=Icon.d.ts.map