@hhgtech/hhg-components
Version:
Hello Health Group common components
15 lines (14 loc) • 869 B
TypeScript
import React, { HTMLAttributes } from 'react';
import { DefaultProps, Selectors, TextProps as MantineTextProps } from '@mantine/core';
import { DataTrackingType } from "../../../interfaces/types";
import useStyles from "./index.styles";
import { TextSize } from "../theme";
export type TextProps<T = HTMLParagraphElement> = {
size?: TextSize;
weight?: 'regular' | 'semiBold' | 'bold' | 'caption' | 'halfBold';
as?: any;
wordWrap?: 'none' | 'break-word' | 'break-all';
isUppercase?: boolean;
} & Omit<HTMLAttributes<T>, 'size'> & Omit<MantineTextProps, 'size' | 'weight' | 'component'> & DefaultProps<Selectors<typeof useStyles>> & DataTrackingType;
declare const Text: <T>({ size, color, weight, as, styles, className, dataEventCategory, dataEventAction, dataEventLabel, ...rest }: TextProps<T>) => React.JSX.Element;
export { Text };