Skip to content

Commit

Permalink
v1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
zeplin-dev committed Aug 11, 2021
1 parent aefca4f commit 630eb6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/models/design-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ import {
export const transformDesignTokensToJSON = function (value: DesignTokens): any {
return {
colors: Object.fromEntries(Object.entries(value.colors).map(([key, val]) => [key, transformColorDesignTokenToJSON(val)])),
spacings: Object.fromEntries(Object.entries(value.spacings).map(([key, val]) => [key, transformSpacingDesignTokenToJSON(val)])),
spacing: Object.fromEntries(Object.entries(value.spacing).map(([key, val]) => [key, transformSpacingDesignTokenToJSON(val)])),
text_styles: Object.fromEntries(Object.entries(value.textStyles).map(([key, val]) => [key, transformTextStyleDesignTokenToJSON(val)]))
}
}

export const transformJSONToDesignTokens = function (value: any): DesignTokens {
return {
colors: Object.fromEntries(Object.entries(value.colors).map(([key, val]) => [key, transformJSONToColorDesignToken(val)])),
spacings: Object.fromEntries(Object.entries(value.spacings).map(([key, val]) => [key, transformJSONToSpacingDesignToken(val)])),
spacing: Object.fromEntries(Object.entries(value.spacing).map(([key, val]) => [key, transformJSONToSpacingDesignToken(val)])),
textStyles: Object.fromEntries(Object.entries(value.text_styles).map(([key, val]) => [key, transformJSONToTextStyleDesignToken(val)]))
}
}
Expand All @@ -62,7 +62,7 @@ export interface DesignTokens {
* @type {{ [key: string]: SpacingDesignToken; }}
* @memberof DesignTokens
*/
spacings: { [key: string]: SpacingDesignToken; };
spacing: { [key: string]: SpacingDesignToken; };
/**
* Text style tokens
* @type {{ [key: string]: TextStyleDesignToken; }}
Expand Down

0 comments on commit 630eb6f

Please sign in to comment.