Skip to content

Commit

Permalink
Merge pull request #46 from jimmymorris/fix/shadowCSS-references-unde…
Browse files Browse the repository at this point in the history
…fined

bug: shadowCSS references returning `0 0 0 0 undefined` if value is `string`
  • Loading branch information
lukasoppermann authored Dec 13, 2023
2 parents 143421f + 4521927 commit d010ec5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/transformer/shadow-css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export const shadowCss: StyleDictionary.Transform = {
type: `value`,
transitive: true,
matcher: isShadow,
transformer: ({ value }: { value: TokenShadow }) =>
`${value.offsetX || 0} ${value.offsetY || 0} ${value.blur || 0} ${value.spread || 0} ${value.color}`
}
transformer: ({ value }: { value: string | TokenShadow }) =>
typeof value === 'string'
? value
: `${value.offsetX || 0} ${value.offsetY || 0} ${value.blur || 0} ${value.spread || 0} ${value.color}`,
}

0 comments on commit d010ec5

Please sign in to comment.