Skip to content

Conversation

lidord-wix
Copy link
Collaborator

Description

Add designTokens infra

Changelog

Add designTokens infra

import {colorsPalette} from './colorsPalette';

export const designTokens = {
...colorsPalette,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't include the system colors palette in the tokens, It might be good for us to have a clear separation between the two objects in the future.
In the Colors class you can load the all together


constructor() {
const colors = Object.assign(colorsPalette, themeColors);
const colors = Object.assign(designTokens, themeColors);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my previous comment on separating between the tokens and colorsPalette, here you can join them together instead of include the colorsPalette in the tokens

const TypedColors = Colors as ExtendTypeWith<typeof Colors, typeof designTokens & typeof themeColors>;
const colorObject = new TypedColors();
colorObject.loadColors(colorsPalette);
colorObject.loadColors(designTokens);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@lidord-wix lidord-wix requested a review from ethanshar January 4, 2022 16:25
@ethanshar ethanshar merged commit 76ebef9 into master Jan 5, 2022
@lidord-wix lidord-wix deleted the infra/designTokens branch January 25, 2022 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants