Files
ui/src/runtime/utils/colors.ts
Benjamin Canac 00e0ab39f8 fix(utils): types
2022-06-30 17:21:08 +02:00

19 lines
410 B
TypeScript

import { omit, kebabCase } from './index'
export const colorsToExclude = [
'inherit',
'transparent',
'current',
'white',
'black',
'slate',
'gray',
'zinc',
'neutral',
'stone'
]
export const excludeColors = (colors: object) => Object.keys(omit(colors, colorsToExclude)).map(color => kebabCase(color)) as string[]
export const colorsAsRegex = (colors: string[]): string => colors.join('|')