import type { ComponentChildren } from "preact";
import { Icon } from "./icons";
export function Hdr({ title, sub }: { title: string; sub: string }) {
return (
);
}
export function CustRow({
name,
desc,
children,
class: cls,
}: {
name?: string;
desc?: ComponentChildren;
children?: ComponentChildren;
class?: string;
}) {
return (
{name != null ?
{name}
: null}
{desc != null ?
{desc}
: null}
{children}
);
}
export function InfoRow({ name, detail }: { name: string; detail: string }) {
return (
);
}
export function Seg({
value,
options,
onPick,
}: {
value: string;
options: Array<[string, string]>;
onPick: (value: string) => void;
}) {
return (
{options.map(([val, label]) => (
))}
);
}
export function Toggle({
on,
disabled,
title,
onClick,
}: {
on: boolean;
disabled?: boolean;
title?: string;
onClick: () => void;
}) {
return (
);
}
export function Pill({ children }: { children: ComponentChildren }) {
return {children};
}
export function IconGhost({
name,
title,
onClick,
size = 15,
}: {
name: string;
title?: string;
onClick: () => void;
size?: number;
}) {
return (
);
}
export function Note({ children }: { children: ComponentChildren }) {
return {children}
;
}
export function Subhead({ children }: { children: ComponentChildren }) {
return {children}
;
}
export function Empty({ children }: { children: ComponentChildren }) {
return {children}
;
}
export function LoadErr({ message }: { message: string }) {
return {message}
;
}