Skip to content

Commit

Permalink
fix(colors): hard-code colors as tailwindcss/colors is different
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed Feb 14, 2022
1 parent 541bcf6 commit f67fdb7
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions src/runtime/utils/colors.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
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 safeColors = [
'rose',
'pink',
'fuchsia',
'purple',
'violet',
'indigo',
'blue',
'sky',
'cyan',
'teal',
'emerald',
'green',
'lime',
'yellow',
'amber',
'orange',
'red'
]

export const safeColorsAsRegex = safeColors.join('|')

1 comment on commit f67fdb7

@vercel
Copy link

@vercel vercel bot commented on f67fdb7 Feb 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

Please sign in to comment.