Adds the shadcn-style copy-paste layer as a new monorepo package. Includes theme token CSS custom properties (light/dark), a cn() class-merging utility with tests, and a reference Dialog styled component wrapping the headless pettyui/dialog primitive with Tailwind classes.
15 lines
402 B
TypeScript
15 lines
402 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { cn } from "../src/utils";
|
|
|
|
describe("cn utility", () => {
|
|
it("joins class names", () => {
|
|
expect(cn("foo", "bar")).toBe("foo bar");
|
|
});
|
|
it("filters falsy values", () => {
|
|
expect(cn("foo", undefined, null, false, "bar")).toBe("foo bar");
|
|
});
|
|
it("returns empty string for no classes", () => {
|
|
expect(cn()).toBe("");
|
|
});
|
|
});
|