Skip to content

Commit

Permalink
fix(tailwind tokens): allow different fontSize configuration values (fix
Browse files Browse the repository at this point in the history
  • Loading branch information
czondi committed Aug 15, 2023
1 parent 8d3872d commit 78c92c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/histoire/src/node/builtin-plugins/tailwind-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ export default {
}, ({ token }) => h('div', {
class: '__hst-truncate',
style: {
fontSize: token.value[0],
...token.value[1],
fontSize: Array.isArray(token.value) ? token.value[0] : token.value,
...(Array.isArray(token.value) && typeof token.value[1] === "object" ? token.value[1] : { lineHeight: token.value[1] })
},
}, sampleText.value))),
onMountControls: (api) => mountApp(api, () => [
Expand Down

0 comments on commit 78c92c0

Please sign in to comment.