Skip to content
This repository was archived by the owner on Dec 28, 2022. It is now read-only.

Commit 9eb2af7

Browse files
fix: erronous export custom tokens (#2)
* fix: erroneous export by custom tailwind exporter * chore: add icons
1 parent 042b268 commit 9eb2af7

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

.github/wordmark.png

56.7 KB
Loading

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
# Zephyr
1+
<div align="center">
2+
<br>
3+
<br>
4+
<p>
5+
<img src="./.github/wordmark.png" alt="Zephyr" width="300">
6+
</p>
7+
<br>
8+
<br>
9+
</div>
210

311
An opinionated Tailwind exporter to be used for all things frontend built by DeepSource.
412

icon.png

-3.83 KB
Loading

src/main-renderers/tailwind-variables.pr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ module.exports = {
3030
'{{ tokenName }}': 'var(--{[ inject "rendered-name" context token /]})', {[ inject "rendered-description" context token /]}
3131

3232
{[/]}
33-
{[ const customSpacingTokens = ds.tokensByType("Strings", brand.id) /]}
34-
{[ traverse customSpacingTokens property subgroups into subgroup ]}
35-
{[ if @and(!subgroup.isRoot,subgroup.name.lowercased() === "screens") ]}
36-
{[ const screenCustomSpacingTokens = ds.tokensByGroupId(subgroup.id) /]}
37-
{[ for screenCustomSpacingToken in screenCustomSpacingTokens ]}
38-
{[ let tokenName = token.name.replacing("$", "").replacing(" ", "-") ]}
39-
'{{ tokenName }}': '{[ inject "rendered-token-var" context tokenName ]}'
33+
{[ const textGroups = ds.tokenGroupsOfType("Text", brand.id) /]}
34+
{[ for group in textGroups ]}
35+
{[ if group.name.equals("Screens") ]}
36+
{[ const screenTokens = ds.tokensByGroupId(group.id) /]}
37+
{[ for token in screenTokens ]}
38+
{[ let tokenName = token.name.replacing("$", "").replacing(" ", "-") /]}
39+
'{{ tokenName }}': '{[ inject "rendered-token-var" context token /]}'
4040
{[/]}
4141
{[/]}
4242
{[/]}

0 commit comments

Comments
 (0)