Spaces:
Running
Running
Download bioai-platform/frontend/src/components/ui/DataCard.tsx from Samad14/bio-nexus-api: direct link, hf CLI and curl.
- Browser
- Download file 966 Bytes
-
https://huggingface.co/spaces/Samad14/bio-nexus-api/resolve/main/bioai-platform/frontend/src/components/ui/DataCard.tsx
- Command line
-
hf download hf://spaces/Samad14/bio-nexus-api/bioai-platform/frontend/src/components/ui/DataCard.tsx
-
curl -L -o DataCard.tsx https://huggingface.co/spaces/Samad14/bio-nexus-api/resolve/main/bioai-platform/frontend/src/components/ui/DataCard.tsx
966 Bytes
| 'use client'; | |
| /** | |
| * Flat, near-opaque card for scientific output (charts, trees, scores). | |
| * No blur, no tint, no extrusion — translucency hurts data readability. | |
| */ | |
| interface DataCardProps { | |
| title?: string; | |
| subtitle?: string; | |
| actions?: React.ReactNode; | |
| children: React.ReactNode; | |
| className?: string; | |
| } | |
| export function DataCard({ title, subtitle, actions, children, className = '' }: DataCardProps) { | |
| return ( | |
| <section className={`data-card p-5 ${className}`}> | |
| {(title || actions) && ( | |
| <header className="mb-4 flex items-center justify-between gap-3"> | |
| <div> | |
| {title && ( | |
| <h2 className="text-base font-semibold tracking-tight text-text-primary"> | |
| {title} | |
| </h2> | |
| )} | |
| {subtitle && <p className="mt-0.5 text-xs text-text-muted">{subtitle}</p>} | |
| </div> | |
| {actions} | |
| </header> | |
| )} | |
| {children} | |
| </section> | |
| ); | |
| } | |