Export selector functions directly in @royalnavy/design-tokens #3797
Labels
Package: design-tokens
Package/code type
Size: Small
Assessed as small task
Type: Enhancement
New feature or request
Projects
Description
Currently to use the selectors in the Design Tokens library you have to import
selectors
and destructure it:I don't know the background to why it was done in this way, but it'd be helpful in general for it to be a bit more ergonomic to use the tokens.
One change towards that would be to make it possible to import the selector functions directly:
(Having to destructure
selectors
is a bit tedious, and also stops IDEs from being able to suggest missing imports.)The text was updated successfully, but these errors were encountered: