Files
phoenix/src/lib/utils.ts
Tobias Klemp cce1dfff33
Some checks failed
CI / install (pull_request) Successful in 3m28s
CI / lint (pull_request) Failing after 45s
CI / type-check (pull_request) Failing after 43s
CI / build (pull_request) Failing after 10m2s
CI / format-check (pull_request) Failing after 10m7s
fix: lint and format cmds
2025-12-03 22:40:08 +01:00

18 lines
631 B
TypeScript

import { clsx, type ClassValue } from 'clsx'
import { twMerge } from 'tailwind-merge'
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type WithoutChild<T> = T extends { child?: any } ? Omit<T, 'child'> : T
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type WithoutChildren<T> = T extends { children?: any }
? Omit<T, 'children'>
: T
export type WithoutChildrenOrChild<T> = WithoutChildren<WithoutChild<T>>
export type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & {
ref?: U | null
}