Skip to content

Commit

Permalink
fix for figma
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasoppermann committed Dec 16, 2024
1 parent 6c3ec7f commit a6475fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/buildFigma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ const buildFigma = async (buildOptions: ConfigGeneratorOptions): Promise<void> =
await extended.buildAllPlatforms()
}
//
for (const {filename, source, include} of themes) {
for (const {filename, source, include, theme} of themes) {
// build functional scales
const extended = await PrimerStyleDictionary.extend({
source,
include,
platforms: {
figma: figma(`figma/themes/${filename}.json`, buildOptions.prefix, buildOptions.buildPath, {
theme: filename.replaceAll('-', ' '),
theme: [theme, getFallbackTheme(theme)],
}),
},
})
Expand Down
3 changes: 2 additions & 1 deletion src/platforms/figma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const figma: PlatformInitializer = (outputFile, prefix, buildPath, option
},
// should this object be spread here?
...options,
theme: options?.theme[0].replaceAll('-', ' '),
themeOverrides: {
theme: options?.theme,
},
Expand All @@ -58,7 +59,7 @@ export const figma: PlatformInitializer = (outputFile, prefix, buildPath, option
format: `json/figma`,
options: {
outputReferences: true,
theme: options?.theme,
theme: options?.theme[0].replaceAll('-', ' '),
},
},
],
Expand Down

0 comments on commit a6475fa

Please sign in to comment.