RocketChat/Rocket.Chat

View on GitHub
ee/packages/ui-theming/src/helpers/convertToCss.ts

Summary

Maintainability
A
30 mins
Test Coverage
export const convertToCss = (values: Record<string, string>, selector = ':root') =>
    `${selector} {\n${Object.entries(values)
        .map(([name, color]) => `--rcx-color-${name}: ${color};`)
        .join('\n')}\n}`;