mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
✨ Add initial shadcn configuration files and utilities
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://shadcn-svelte.com/schema.json",
|
||||||
|
"tailwind": {
|
||||||
|
"css": "src\\styles\\globals.css",
|
||||||
|
"baseColor": "neutral"
|
||||||
|
},
|
||||||
|
"aliases": {
|
||||||
|
"components": "@/components",
|
||||||
|
"utils": "@/utils",
|
||||||
|
"ui": "@/components/ui",
|
||||||
|
"hooks": "@/hooks",
|
||||||
|
"lib": "@/lib"
|
||||||
|
},
|
||||||
|
"typescript": true,
|
||||||
|
"registry": "https://shadcn-svelte.com/registry"
|
||||||
|
}
|
||||||
@@ -1 +1,7 @@
|
|||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
|
|
||||||
|
/* Plugins */
|
||||||
|
@import "tw-animate-css";
|
||||||
|
|
||||||
|
/* Dark Mode */
|
||||||
|
@custom-variant dark (&:is(.dark *));
|
||||||
|
|||||||
@@ -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;
|
||||||
|
};
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import { clsx, type ClassValue } from "clsx";
|
||||||
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
|
export function cn(...inputs: ClassValue[]) {
|
||||||
|
return twMerge(clsx(inputs));
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user