import * as React from 'react'; import { EllipsisCommonProps } from '../common/Ellipsis'; import { OmitPolyfill, TooltipCommonProps } from '../common'; import {PropsWithChildren} from "react"; export type TextWithAsProp = | TextAsSpanProps | TextAsAnchorProps | TextGenericProps | TextAsComponentProps; type TextAsSpanProps = React.HTMLAttributes & T & { tagName?: 'span'; onClick?: React.MouseEventHandler; }; type TextAsAnchorProps = React.AnchorHTMLAttributes & T & { tagName: 'a'; onClick?: React.MouseEventHandler; }; type TextGenericProps = T & { tagName: keyof OmitPolyfill; onClick?: React.MouseEventHandler; [additionalProps: string]: any; }; type TextAsComponentProps = T & { tagName: React.ComponentType; onClick?: React.MouseEventHandler; [additionalProps: string]: any; }; export type TextPropsBase = OmitPolyfill & { dataHook?: string; tagName?: string; className?: string; size?: TextSize; secondary?: boolean; skin?: TextSkin; light?: boolean; weight?: TextWeight; listStyle?: ListStyle; tooltipProps?: TooltipCommonProps; }; export type TextProps = TextWithAsProp; export const Text: React.FC>; export default Text; export type TextSize = 'tiny' | 'small' | 'medium'; export type TextSkin = | 'standard' | 'error' | 'success' | 'premium' | 'disabled' | 'primary'; export type TextWeight = 'thin' | 'normal' | 'bold'; export type ListStyle = 'checkmark' | 'circle';