MCPcopy
hub / github.com/shadcn-ui/ui / ChartIframe

Function ChartIframe

apps/v4/components/chart-iframe.tsx:7–31  ·  view source on GitHub ↗
({
  src,
  height,
  title,
}: {
  src: string
  height: number
  title: string
})

Source from the content-addressed store, hash-verified

5import { cn } from "@/lib/utils"
6
7export function ChartIframe({
8 src,
9 height,
10 title,
11}: {
12 src: string
13 height: number
14 title: string
15}) {
16 const [loaded, setLoaded] = React.useState(false)
17
18 return (
19 <iframe
20 src={src}
21 className={cn(
22 "w-full border-none transition-opacity duration-300",
23 loaded ? "opacity-100" : "opacity-0"
24 )}
25 height={height}
26 loading="lazy"
27 title={title}
28 onLoad={() => setLoaded(true)}
29 />
30 )
31}

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected