({ tag, label })
| 104 | } |
| 105 | |
| 106 | function CodePanelHeader({ tag, label }) { |
| 107 | if (!tag && !label) { |
| 108 | return null |
| 109 | } |
| 110 | |
| 111 | return ( |
| 112 | <div className="flex h-9 items-center gap-2 border-y border-b-white/7.5 border-t-transparent bg-white/2.5 bg-zinc-900 px-4 dark:border-b-white/5 dark:bg-white/1"> |
| 113 | {tag && ( |
| 114 | <div className="dark flex"> |
| 115 | <Tag variant="small">{tag}</Tag> |
| 116 | </div> |
| 117 | )} |
| 118 | {tag && label && ( |
| 119 | <span className="h-0.5 w-0.5 rounded-full bg-zinc-500" /> |
| 120 | )} |
| 121 | {label && ( |
| 122 | <span className="font-mono text-xs text-zinc-400">{label}</span> |
| 123 | )} |
| 124 | </div> |
| 125 | ) |
| 126 | } |
| 127 | |
| 128 | function CodePanel({ children, tag, label, code }) { |
| 129 | let child = Children.only(children) |
nothing calls this directly
no outgoing calls
no test coverage detected