import './badge.css';
import type { ComponentChildren } from 'preact';
export function Badge({
tone,
title,
children,
}: {
tone?: 'acc' | 'ok' | 'warn' | 'solid';
title?: string;
children: ComponentChildren;
}) {
return (
{children}
);
}
export function Chips({ values }: { values: Array }) {
const shown = values.filter((value): value is string => Boolean(value));
if (!shown.length) return None;
return (
{shown.map(value => (
{value}
))}
);
}
/** A record's id: secondary, never a page's or row's label; the line it sits on clips it when space runs out. */
export function Id({ value, title }: { value: string; title?: string }) {
return (
{value}
);
}