Spaces:
Running
Running
Download src/lib/utils.ts from blanchon/opencs2-dataset-viewer: direct link, hf CLI and curl.
- Browser
- Download file 513 Bytes
-
https://huggingface.co/spaces/blanchon/opencs2-dataset-viewer/resolve/main/src/lib/utils.ts
- Command line
-
hf download hf://spaces/blanchon/opencs2-dataset-viewer/src/lib/utils.ts
-
curl -L -o utils.ts https://huggingface.co/spaces/blanchon/opencs2-dataset-viewer/resolve/main/src/lib/utils.ts
513 Bytes
| import { clsx, type ClassValue } from 'clsx'; | |
| import { twMerge } from 'tailwind-merge'; | |
| export function cn(...inputs: ClassValue[]) { | |
| return twMerge(clsx(inputs)); | |
| } | |
| export type WithoutChild<T> = T extends { child?: unknown } ? Omit<T, 'child'> : T; | |
| export type WithoutChildren<T> = T extends { children?: unknown } ? Omit<T, 'children'> : T; | |
| export type WithoutChildrenOrChild<T> = WithoutChildren<WithoutChild<T>>; | |
| export type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & { ref?: U | null }; | |