mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-03-29 10:46:38 +00:00
14 lines
507 B
TypeScript
14 lines
507 B
TypeScript
import { type ClassValue, clsx } from 'clsx';
|
|
import { twMerge } from 'tailwind-merge';
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs));
|
|
}
|
|
|
|
export type WithoutChild<T> = T extends { child?: any } ? Omit<T, 'child'> : T;
|
|
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;
|
|
};
|