@@ -85,8 +113,8 @@ export function ColorSwatches() {
const colors = ${JSON.stringify(swatchesData, null, 2)};
`;
- case 'svelte':
- return `
+ case 'svelte':
+ return `
@@ -96,8 +124,8 @@ const colors = ${JSON.stringify(swatchesData, null, 2)};
{#each colors as color}
-
@@ -109,8 +137,8 @@ const colors = ${JSON.stringify(swatchesData, null, 2)};
`;
- case 'html':
- return `
+ case 'html':
+ return `
Color Palette
@@ -124,19 +152,19 @@ const colors = ${JSON.stringify(swatchesData, null, 2)};
`).join('\n ')}
`;
+ }
}
-}
-/**
- * Generate typography specimens
- */
-function generateTypographySpecimens(tokens: DesignToken[], framework: FrameworkType): string {
- const fontSizes = tokens.filter(t => t.name.includes('font-size'));
- const fontWeights = tokens.filter(t => t.name.includes('font-weight'));
-
- switch (framework) {
- case 'react':
- return `
+ /**
+ * Generate typography specimens
+ */
+ private generateTypographySpecimens(tokens: DesignToken[], framework: FrameworkType): string {
+ const fontSizes = tokens.filter(t => t.name.includes('font-size'));
+ const fontWeights = tokens.filter(t => t.name.includes('font-weight'));
+
+ switch (framework) {
+ case 'react':
+ return `
export function TypographySpecimens() {
return (
@@ -146,7 +174,7 @@ export function TypographySpecimens() {
${token.name}
The quick brown fox jumps over the lazy dog
`).join('\n ')}
-
+
Font Weights
${fontWeights.slice(0, 4).map(token => `
@@ -156,8 +184,8 @@ export function TypographySpecimens() {
);
}`;
- case 'vue':
- return `
+ case 'vue':
+ return `
Typography Scale
@@ -166,7 +194,7 @@ export function TypographySpecimens() {
${token.name}
The quick brown fox jumps over the lazy dog
`).join('\n ')}
-
+
Font Weights
${fontWeights.slice(0, 4).map(token => `
@@ -175,8 +203,8 @@ export function TypographySpecimens() {
`;
- case 'svelte':
- return `
+ case 'svelte':
+ return `