/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
apps/dashboard/src/utils/ui.ts
33 строки
704 B
Adam Chmara
chore(root): global lint fixes (#8842)
31 июл 2025, 17:20
Не верифицирован
31 июл 2025, 17:20
6ee5a5b
Код
Авторство
О чём код?
import clsx, { type ClassValue } from 'clsx'; import { extendTailwindMerge } from 'tailwind-merge'; import { borderRadii, shadows, texts } from '../../tailwind.config'; export type { ClassValue } from 'clsx'; export const twMergeConfig = { extend: { classGroups: { 'font-size': [ { text: Object.keys(texts), }, ], shadow: [ { shadow: Object.keys(shadows), }, ], rounded: [ { rounded: Object.keys(borderRadii), }, ], }, }, }; const customTwMerge = extendTailwindMerge(twMergeConfig); export function cn(...classes: ClassValue[]) { return customTwMerge(clsx(...classes)); }