MCPcopy Create free account
hub / github.com/Thanas-R/Virdis / CustomTooltip

Function CustomTooltip

src/components/FieldDetailView.tsx:203–212  ·  view source on GitHub ↗
({ active, payload }: any)

Source from the content-addressed store, hash-verified

201 )}
202 </div>
203 );
204}
205
206const CustomTooltip = ({ active, payload }: any) => {
207 if (!active || !payload?.length) return null;
208 const { name, value } = payload[0].payload;
209 return (
210 <div className="rounded-lg px-3 py-2 shadow-xl border border-border/50" style={{ background: "hsl(150, 18%, 12%)", color: "hsl(60, 20%, 90%)" }}>
211 <div className="text-xs font-semibold">{name}</div>
212 <div className="text-sm font-bold">{typeof value === 'number' ? value.toFixed(1) : value}%</div>
213 </div>
214 );
215};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected