mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-19 06:21:46 +01:00
fix(module): move colors utils to runtime dir
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { safeColors } from '../../utils'
|
||||
import { safeColors } from '../utils/colors'
|
||||
|
||||
const button = {
|
||||
base: 'font-medium focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 focus:ring-offset-white dark:focus:ring-offset-black',
|
||||
|
||||
6
src/runtime/utils/colors.ts
Normal file
6
src/runtime/utils/colors.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import colors from 'tailwindcss/colors.js'
|
||||
import { without, kebabCase } from 'lodash-es'
|
||||
|
||||
export const safeColors = without(Object.keys(colors).map(kebabCase), 'inherit', 'current', 'transparent', 'black', 'white', 'gray')
|
||||
|
||||
export const safeColorsAsRegex = safeColors.join('|')
|
||||
Reference in New Issue
Block a user