mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-05 11:09:39 +00:00
code: tsx,nextjs,frontends (2 files)
This commit is contained in:
@@ -22,6 +22,7 @@ interface CssCategory {
|
||||
classes: string[]
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
const CLASS_TOKEN_PATTERN = /^[A-Za-z0-9:_/.\[\]()%#!,=+-]+$/
|
||||
const parseClassList = (value: string) => Array.from(new Set(value.split(/\s+/).filter(Boolean)))
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import { Database, CssCategory } from '@/lib/database'
|
||||
import { Plus, X, Pencil, Trash, FloppyDisk } from '@phosphor-icons/react'
|
||||
import { toast } from 'sonner'
|
||||
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
const CLASS_TOKEN_PATTERN = /^[A-Za-z0-9:_/.\[\]()%#!,=+-]+$/
|
||||
const uniqueClasses = (classes: string[]) => Array.from(new Set(classes))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user