Skip to content

Commit

Permalink
Docs(DICTIONARIES): Add background color dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelklibani committed Dec 12, 2024
1 parent dfcc398 commit 3c86457
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/DICTIONARIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ This project uses `dictionaries` to unify props between different components.
| ----------------- | ---------------------------------------------------------------- | --------------- |
| Action Color | `primary`, `secondary`, `tertiary`, `inverted` | ActionColor |
| Action Link Color | `primary`, `secondary`, `inverted` | ActionLinkColor |
| Background Color | `primary`, `secondary`, `tertiary` | BackgroundColor |
| Emotion Color | `success`, `informative`, `warning`, `danger` | EmotionColor |
| Text Color | `primary`, `secondary`, `primary-inverted`, `secondary-inverted` | TextColor |

Expand Down
6 changes: 6 additions & 0 deletions packages/web-react/src/constants/dictionaries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ export const ActionLinkColors = {
TERTIARY: 'tertiary',
} as const;

export const BackgroundColors = {
PRIMARY: 'primary',
SECONDARY: 'secondary',
TERTIARY: 'tertiary',
} as const;

export const EmotionColors = {
SUCCESS: 'success',
INFORMATIVE: 'informative',
Expand Down
6 changes: 6 additions & 0 deletions packages/web-react/src/types/shared/dictionaries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
SizesExtended,
TextColors,
ValidationStates,
BackgroundColors,
} from '../../constants';

/* Alignment */
Expand Down Expand Up @@ -46,6 +47,11 @@ export type ActionLinkColorsDictionaryType<C = undefined> =
| (typeof ActionLinkColors)[ActionLinkColorsDictionaryKeys]
| C;

export type BackgroundColorsDictionaryKeys = keyof typeof BackgroundColors;
export type BackgroundColorsDictionaryType<C = undefined> =
| (typeof BackgroundColors)[BackgroundColorsDictionaryKeys]
| C;

export type EmotionColorsDictionaryKeys = keyof typeof EmotionColors;
export type EmotionColorsDictionaryType<C = undefined> = (typeof EmotionColors)[EmotionColorsDictionaryKeys] | C;

Expand Down

0 comments on commit 3c86457

Please sign in to comment.