mikaelvesavuori / figmagic

Figmagic is the missing piece between DevOps and design: Generate design tokens, export graphics, and extract design token-driven React components from your Figma documents.
https://docs.figmagic.com
MIT License
807 stars 71 forks source link

Added second and millisecond units to duration token #173

Closed mitchdotdeveloper closed 1 year ago

mitchdotdeveloper commented 1 year ago

Hey Mikael!

I am currently using figmagic at work, awesome project btw, as we build out our design system and thought this might be a worthwhile addition.

In this PR I added the units s and ms, seconds and milliseconds respectively, to the duration token. In our use we found we were having to append s to all of our duration tokens which is somewhat cumbersome.

Currently I have duration units defaulting to s, however I'm curious if you think it would be useful to have the duration units as an "opt-in" unit? Some cases like CSS will require s or ms however these could also be used in JS with setTimeout for example which does not have units attached and expects milliseconds.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

mikaelvesavuori commented 1 year ago

Looking good @mitchdotdeveloper! Great work and happy to merge this in.

I will add your name to the list of contributors too and push this to a new release ASAP.

mikaelvesavuori commented 1 year ago

Please find your additions now released in 4.5.5 at https://github.com/mikaelvesavuori/figmagic/releases/tag/v4.5.5

Thanks for contributing!