diff --git a/packages/canvas-tokens-docs/stories/brand/examples/Color.tsx b/packages/canvas-tokens-docs/stories/brand/examples/Color.tsx index df70ce8..0fbc14e 100644 --- a/packages/canvas-tokens-docs/stories/brand/examples/Color.tsx +++ b/packages/canvas-tokens-docs/stories/brand/examples/Color.tsx @@ -15,6 +15,8 @@ const palettes = Object.keys(brand).map(key => { }; }); +brand.alert.accent + export const ColorTokens = () => { return ( diff --git a/packages/canvas-tokens/utils/formatters/formatTypes.ts b/packages/canvas-tokens/utils/formatters/formatTypes.ts index a5d5d68..44f1698 100644 --- a/packages/canvas-tokens/utils/formatters/formatTypes.ts +++ b/packages/canvas-tokens/utils/formatters/formatTypes.ts @@ -61,7 +61,7 @@ const recursivelyCreateFileStructure = ({ const innerText = depth ? `${spaces}"${key}": "${values}",` - : `${startingText} ${key}: "${values}";`; + : `${startingText} ${key}: "${values}";\n`; const fullInnerText = jsDocText + innerText; updatedContent = replaceInContent(`**${key}**`, fullInnerText); @@ -73,7 +73,7 @@ const recursivelyCreateFileStructure = ({ .join('\n'); const innerText = !depth - ? `${startingText} ${key}: {\n${placeholders}\n};` + ? `${startingText} ${key}: {\n${placeholders}\n};\n` : `${spaces}"${key}": {\n${placeholders}\n${spaces}},`; updatedContent = replaceInContent(`**${key}**`, innerText); diff --git a/packages/canvas-tokens/utils/spec/formats.spec.ts b/packages/canvas-tokens/utils/spec/formats.spec.ts index 8da0017..4421661 100644 --- a/packages/canvas-tokens/utils/spec/formats.spec.ts +++ b/packages/canvas-tokens/utils/spec/formats.spec.ts @@ -374,7 +374,7 @@ describe('formats', () => { const expected = headerContent + - 'export declare const opacity: {\n /**\n * 0.4\n * \n * Test JSDoc\n */\n "disabled": "--cnvs-base-opacity-300",\n};'; + 'export declare const opacity: {\n /**\n * 0.4\n * \n * token: base.opacity.400\n * \n * Test JSDoc\n */\n "disabled": "--cnvs-base-opacity-300",\n};\n'; expect(result).toBe(expected); }); @@ -402,7 +402,7 @@ describe('formats', () => { const expected = headerContent + - 'export declare const opacity: {\n /** 0.4 */\n "disabled": "--cnvs-base-opacity-300",\n};'; + 'export declare const opacity: {\n /** 0.4 */\n "disabled": "--cnvs-base-opacity-300",\n};\n'; expect(result).toBe(expected); });