livechat / design-system

LiveChat design system components
https://design.livechat.com
27 stars 9 forks source link

[Tag] - user can apply any token to content and surface #1211

Closed vladko-uxds closed 2 weeks ago

vladko-uxds commented 3 months ago

Update Tag component with option to apply any color token to Content and Surface https://design.livechat.com/?path=/story/components-tag--kinds

VadymBezpalko commented 3 months ago

Development hint: To achieve this we can use already existing customColor prop, but we need to modify the existing logic for text color discovering and switch from getContrast function, that cannot work with our CSS tokens, and replace it with native SCSS function called lightness() [DOCS]. Using scss function we will be able to pass CSS tokens so SCSS mechanism will retrieve proper value from our CSS constants.