mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-16 13:08:06 +01:00
19 lines
410 B
TypeScript
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('|')
|