STORY: shadcn/ui components expect @/lib/utils to exist for the cn() helper. Our project uses src/lib/, but shadcn creates lib/ at root. COLLABORATION: Created lib/utils.ts with the cn() function to satisfy shadcn imports. This coexists with src/lib/utils.ts - both export the same function. VERIFICATION: - npm run typecheck: PASS
6 lines
169 B
TypeScript
6 lines
169 B
TypeScript
import { type ClassValue, clsx } from "clsx";
|
|
import { twMerge } from "tailwind-merge";
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs));
|
|
}
|