Skip to content

Commit

Permalink
fix: add transitive to transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Code-Monkey committed Sep 16, 2022
1 parent d0f67fe commit 1bfd10b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/theme/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ StyleDictionary.registerFormat({
StyleDictionary.registerTransform({
name: 'color/makeShades',
type: 'value',
transitive: true,
matcher(prop: { attributes: { type: string }; makeShades?: boolean }) {
return prop.attributes.type === 'intents' || prop.makeShades;
},
Expand Down Expand Up @@ -174,6 +175,7 @@ StyleDictionary.registerTransform({
StyleDictionary.registerTransform({
name: 'color/makeNeutrals',
type: 'value',
transitive: true,
matcher(prop: { attributes: { type: string } }) {
// this is an example of a possible filter (based on the "cti" values) to show how a "matcher" works
return prop.attributes.type === 'neutral_base';
Expand Down

0 comments on commit 1bfd10b

Please sign in to comment.