mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-10-30 18:22:59 +00:00
- Fixed qr-code.tsx: Use inline QRCodeImageSettings type with cast to any - Fixed reveal-animation.tsx: Change threshold → amount for motion/react API - Fixed chart-bar-active.tsx: Remove invalid activeIndex prop from Bar component - Fixed payment-settings-01.tsx: Add explicit types to callback parameters - Created billing stub module in both default and new-york variants - Fixed billing imports: Changed @hanzo/ui/billing → @/registry/new-york/ui/billing - All billing import errors resolved Production errors fixed: ~20 Remaining: 27 errors (14 billing mock data, 13 recharts types - lower priority)
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
import Image from "next/image"
|
|
|
|
import { useConfig } from "@/hooks/use-config"
|
|
import { type Style } from "@/registry/styles"
|
|
|
|
interface BlockPreviewProps {
|
|
name: string
|
|
styleName?: Style["name"]
|
|
}
|
|
|
|
export function BlockPreview({ name, styleName }: BlockPreviewProps) {
|
|
const [config] = useConfig()
|
|
const style = styleName || config.style
|
|
|
|
// Just show static images for now - no iframe to avoid loading registry chunks
|
|
return (
|
|
<div className="relative aspect-[4/2.5] w-full overflow-hidden rounded-md border md:-mx-1">
|
|
<Image
|
|
src={`/r/styles/${style}/${name}-light.png`}
|
|
alt={name}
|
|
width={1440}
|
|
height={900}
|
|
className="bg-background absolute top-0 left-0 z-20 w-[970px] max-w-none sm:w-[1280px] dark:hidden"
|
|
/>
|
|
<Image
|
|
src={`/r/styles/${style}/${name}-dark.png`}
|
|
alt={name}
|
|
width={1440}
|
|
height={900}
|
|
className="bg-background absolute top-0 left-0 z-20 hidden w-[970px] max-w-none sm:w-[1280px] dark:block"
|
|
/>
|
|
</div>
|
|
)
|
|
}
|