diff --git a/packages/web-react/src/types/heading.ts b/packages/web-react/src/types/heading.ts index b04fda84c2..f848cde582 100644 --- a/packages/web-react/src/types/heading.ts +++ b/packages/web-react/src/types/heading.ts @@ -2,6 +2,7 @@ import { ElementType, JSXElementConstructor } from 'react'; import { ChildrenProps, EmphasisDictionaryType, + EmphasisProps, SizeExtendedDictionaryType, SizeProps, StyleProps, @@ -23,9 +24,7 @@ export interface HeadingProps StyleProps, TransferProps {} -export interface SpiritHeadingProps +export interface SpiritHeadingProps extends HeadingProps, - SizeProps> { - /** Emphasis of the heading */ - emphasis?: EmphasisDictionaryType | undefined | null; -} + SizeProps>, + EmphasisProps> {} diff --git a/packages/web-react/src/types/shared/dictionaries.ts b/packages/web-react/src/types/shared/dictionaries.ts index 7e49c90fa3..a44526e8d2 100644 --- a/packages/web-react/src/types/shared/dictionaries.ts +++ b/packages/web-react/src/types/shared/dictionaries.ts @@ -52,6 +52,10 @@ export type EmotionColorsDictionaryType = (typeof EmotionColors)[ export type EmphasisDictionaryKeys = keyof typeof Emphasis; export type EmphasisDictionaryType = (typeof Emphasis)[EmphasisDictionaryKeys] | C; +export interface EmphasisProps { + emphasis?: E; +} + export type TextColorsDictionaryKeys = keyof typeof TextColors; export type TextColorsDictionaryType = (typeof TextColors)[TextColorsDictionaryKeys] | C; diff --git a/packages/web-react/src/types/text.ts b/packages/web-react/src/types/text.ts index d187b3d601..0370dcf2da 100644 --- a/packages/web-react/src/types/text.ts +++ b/packages/web-react/src/types/text.ts @@ -2,6 +2,7 @@ import { ElementType, JSXElementConstructor } from 'react'; import { ChildrenProps, EmphasisDictionaryType, + EmphasisProps, SizeExtendedDictionaryType, SizeProps, StyleProps, @@ -23,9 +24,7 @@ export interface TextProps StyleProps, TransferProps {} -export interface SpiritTextProps +export interface SpiritTextProps extends TextProps, - SizeProps> { - /** Emphasis of the text */ - emphasis?: EmphasisDictionaryType | undefined | null; -} + SizeProps>, + EmphasisProps> {}