From 31283eb0ea0ec471d456028cf1fc9a2ffd7ff2e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kry=C5=A1p=C3=ADn?= Date: Tue, 17 Sep 2024 17:02:04 +0200 Subject: [PATCH] fixup! BREAKING CHANGE(web-react): Switch Link, Heading and Text to v3 design tokens #DS-1451 --- packages/web-react/src/types/heading.ts | 9 ++++----- packages/web-react/src/types/shared/dictionaries.ts | 4 ++++ packages/web-react/src/types/text.ts | 9 ++++----- 3 files changed, 12 insertions(+), 10 deletions(-) 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> {}