storybook-design-token icon indicating copy to clipboard operation
storybook-design-token copied to clipboard

Feature Request: Ignore path for hard coded values and RGB support

Open codequistador opened this issue 4 years ago • 4 comments

Hello! First of all, this plugin is great. It was super easy to set up and has almost everything I need for my component library. Great work!

I am wondering if you could add a config option to disable or customize the hard coded values section. An option to disable this altogether would be fine to start, but it might be useful to include a path or two to ignore when compiling this list.

Finally, wondering if RGB support could be added? Is the plugin just reading hex values? Could it convert hex to rgb?

Thank you!

Justin

codequistador avatar Oct 15 '20 20:10 codequistador

It would be sweet to be able to render this on a single docs page as well. Any thoughts on that?

codequistador avatar Oct 15 '20 20:10 codequistador

Hey.

I am wondering if you could add a config option to disable or customize the hard coded values section. An option to disable this altogether would be fine to start, but it might be useful to include a path or two to ignore when compiling this list.

Should be an easy improvement. I'll add it to the list.

Finally, wondering if RGB support could be added? Is the plugin just reading hex values? Could it convert hex to rgb?

Color functions like rgb(a) and hsl(a) should already work. What are the issues you are experiencing?

It would be sweet to be able to render this on a single docs page as well. Any thoughts on that?

Not planned right now. But have a look at this workaround for now: https://github.com/UX-and-I/storybook-design-token/issues/13#issuecomment-658832724

Sqrrl avatar Oct 16 '20 10:10 Sqrrl

Added a new option to disable the hard coded value list. Available with v0.8.0 https://github.com/UX-and-I/storybook-design-token#configure-for-storybook-53-and-later

Sqrrl avatar Oct 16 '20 12:10 Sqrrl

Hey.

Thank you for the quick release! That's awesome.

As for the rgb(a) there are no issues, but I am more talking about the a programatic conversion from hex to rgba so that both can be shown. No worries if that's not a priority or even a good idea haha.

Thanks again!

Justin

codequistador avatar Oct 16 '20 15:10 codequistador