Add initial shadcn configuration files and utilities

This commit is contained in:
pheralb
2025-08-21 10:53:41 +01:00
parent e49dae5460
commit 0ef7c50322
4 changed files with 39 additions and 0 deletions
+6
View File
@@ -1 +1,7 @@
@import "tailwindcss";
/* Plugins */
@import "tw-animate-css";
/* Dark Mode */
@custom-variant dark (&:is(.dark *));
+11
View File
@@ -0,0 +1,11 @@
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;
};
+6
View File
@@ -0,0 +1,6 @@
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}