MCPcopy Create free account
hub / github.com/Surfer-Org/Protocol / CodePanelHeader

Function CodePanelHeader

docs/src/components/Code.jsx:106–126  ·  view source on GitHub ↗
({ tag, label })

Source from the content-addressed store, hash-verified

104}
105
106function 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
128function CodePanel({ children, tag, label, code }) {
129 let child = Children.only(children)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected