diff --git a/src/components/Text/Text.tsx b/src/components/Text/Text.tsx index d78f42ecbf..ca511f1598 100644 --- a/src/components/Text/Text.tsx +++ b/src/components/Text/Text.tsx @@ -7,14 +7,14 @@ import type {ColorTextBaseProps} from './colorText/colorText'; import {text} from './text/text'; import type {TextBaseProps} from './text/text'; -export interface TextProps +export interface TextProps extends Omit, ColorTextBaseProps, QAProps { /** * Ability to override default html tag */ - as?: keyof JSX.IntrinsicElements; + as?: C; style?: React.CSSProperties; className?: string; id?: string; @@ -25,9 +25,8 @@ export interface TextProps type TextRef = React.ComponentPropsWithRef['ref']; -type TextPropsWithoutRef = { - as?: C; -} & Omit; +type TextPropsWithoutRef = TextProps & + Omit, keyof TextProps>; /** * A component for working with typography.