app/components/admin/media-display-group.tsx
27 lines and 2 functions in DrDustinEdwards/dustinedwards-info, at commit 1590ba4 on 2026-10-24. This file on GitHub.
Functions
| Function | Lines | Complexity | Covered | CRAP | Mutation |
|---|---|---|---|---|---|
| MediaDisplayGroup | 6 to 29 | 1 | No data: no coverage report in this map | No data: no coverage report in this map | No data: no mutants in this code |
| <anonymous:21> | 21 to 25 | 1 | No data: no coverage report in this map | No data: no coverage report in this map | No data: no mutants in this code |
Imports
It imports app/components/admin/tab-link.tsx. Imported by app/components/admin/media-display-bar.tsx.
Source
import { TabsNav } from "capsomer/react/tabs";
import { TabLink } from "~/components/admin/tab-link";
// Links, not a select: each option is a URL, so display state is shareable and works with no script.
export function MediaDisplayGroup({
label,
options,
current,
hrefFor,
}: {
label: string;
options: Array<[string, string]>;
current: string;
hrefFor: (id: string) => string;
}) {
return (
<div className="cap-field">
<span className="cap-field-label">{label}</span>
<TabsNav aria-label={label} size="sm">
{options.map(([id, text]) => (
<TabLink key={id} to={hrefFor(id)} current={current === id}>
{text}
</TabLink>
))}
</TabsNav>
</div>
);
}