Skip to content

Commit

Permalink
fix(tailwind): update animation token export types (#2047)
Browse files Browse the repository at this point in the history
  • Loading branch information
booc0mtaco authored Aug 26, 2024
1 parent 2e7f1ac commit 0f95301
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ const {
...colorTokens
} = edsTokens.theme.color;

// Add a type to the token sizes to avoid literals for keys
// Add a type to the tokens to avoid literals for keys
const sizes: { [x: string]: string } = edsTokens.size;
const movements: { [x: string]: string } = edsTokens.anim.move;

// add a type to the token sizes for movement durations
const movement: { [x: string]: string } = {
...Object.keys(edsTokens.anim.move)
const movementTokens = {
...Object.keys(movements)
.map((movement) => {
return { [movement]: `${edsTokens.anim.move[movement]}s` };
return { [movement]: `${movements[movement]}s` };
})
.reduce((accumulate, current) => {
const entry = Object.entries(current)[0];
Expand Down Expand Up @@ -66,7 +66,7 @@ export default {
...sizeTokens,
},
transitionDuration: {
...movement,
...movementTokens,
},
},
fontWeight: {
Expand Down

0 comments on commit 0f95301

Please sign in to comment.