- Add runtime deps: react-query, react-hook-form+zod, zustand, ky, openapi-fetch, better-auth, react-markdown, shiki, recharts, next-themes, nuqs, sonner, cmdk, vaul, embla-carousel-react, motion, date-fns, tailwind-merge, clsx, cva - Add dev tooling: vitest, testing-library, playwright, prettier(+tailwind plugin), husky, lint-staged, jsdom - Wire providers (QueryClient, Theme, NuqsAdapter, Tooltip, Sonner) into layout - Add vitest/playwright/prettier configs + lint-staged pre-commit hook - Add lib/query-client + lib/http (ky) helpers and sample unit test - Fix react-hooks/set-state-in-effect lint errors (use-mobile useSyncExternalStore, carousel async init) - Remove committed Next-generated types/ duplicates (regenerated under .next/types)
23 lines
397 B
TypeScript
23 lines
397 B
TypeScript
import { cn } from "cn";
|
|
|
|
function AspectRatio({
|
|
ratio,
|
|
className,
|
|
...props
|
|
}: React.ComponentProps<"div"> & { ratio: number }) {
|
|
return (
|
|
<div
|
|
data-slot="aspect-ratio"
|
|
style={
|
|
{
|
|
"--ratio": ratio,
|
|
} as React.CSSProperties
|
|
}
|
|
className={cn("relative aspect-(--ratio)", className)}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export { AspectRatio };
|