Skip to content

Commit

Permalink
fixup! BREAKING CHANGE(web-react): Switch Link, Heading and Text to v…
Browse files Browse the repository at this point in the history
…3 design tokens #DS-1451
  • Loading branch information
crishpeen committed Sep 17, 2024
1 parent 24f2a35 commit 31283eb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
9 changes: 4 additions & 5 deletions packages/web-react/src/types/heading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ElementType, JSXElementConstructor } from 'react';
import {
ChildrenProps,
EmphasisDictionaryType,
EmphasisProps,
SizeExtendedDictionaryType,
SizeProps,
StyleProps,
Expand All @@ -23,9 +24,7 @@ export interface HeadingProps<T extends ElementType = 'div'>
StyleProps,
TransferProps {}

export interface SpiritHeadingProps<T extends ElementType = 'div', S = void>
export interface SpiritHeadingProps<T extends ElementType = 'div', S = void, E = void>
extends HeadingProps<T>,
SizeProps<SizeExtendedDictionaryType<S>> {
/** Emphasis of the heading */
emphasis?: EmphasisDictionaryType | undefined | null;
}
SizeProps<SizeExtendedDictionaryType<S>>,
EmphasisProps<EmphasisDictionaryType<E>> {}
4 changes: 4 additions & 0 deletions packages/web-react/src/types/shared/dictionaries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export type EmotionColorsDictionaryType<C = undefined> = (typeof EmotionColors)[
export type EmphasisDictionaryKeys = keyof typeof Emphasis;
export type EmphasisDictionaryType<C = undefined> = (typeof Emphasis)[EmphasisDictionaryKeys] | C;

export interface EmphasisProps<E> {
emphasis?: E;
}

export type TextColorsDictionaryKeys = keyof typeof TextColors;
export type TextColorsDictionaryType<C = undefined> = (typeof TextColors)[TextColorsDictionaryKeys] | C;

Expand Down
9 changes: 4 additions & 5 deletions packages/web-react/src/types/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ElementType, JSXElementConstructor } from 'react';
import {
ChildrenProps,
EmphasisDictionaryType,
EmphasisProps,
SizeExtendedDictionaryType,
SizeProps,
StyleProps,
Expand All @@ -23,9 +24,7 @@ export interface TextProps<T extends ElementType = 'p'>
StyleProps,
TransferProps {}

export interface SpiritTextProps<T extends ElementType = 'p', S = void>
export interface SpiritTextProps<T extends ElementType = 'p', S = void, E = void>
extends TextProps<T>,
SizeProps<SizeExtendedDictionaryType<S>> {
/** Emphasis of the text */
emphasis?: EmphasisDictionaryType | undefined | null;
}
SizeProps<SizeExtendedDictionaryType<S>>,
EmphasisProps<EmphasisDictionaryType<E>> {}

0 comments on commit 31283eb

Please sign in to comment.