UNPKG

@bee-design/ui

Version:

Bee Design React UI Library.

17 lines (14 loc) 442 B
const { getRgbStr } = require('./utils'); module.exports = { install(_, __, functions) { functions.add('getRgbStr', (color) => { return getRgbStr(color.value); }); functions.add('getVarStr', (color) => { if (color.value.indexOf('rgb') === 0) { return color.value.replace(/rgb\((.*)\)/, '$1'); } return getRgbStr(color.value); }); }, };