import { type ColorInput, TextAttributes } from "@opentui/core"; import { Show } from "solid-js"; import { theme } from "../index.ts"; import { Badge } from "./Badge.tsx"; export interface ToggleProps { on: boolean; onToggle?: () => void; onColor?: ColorInput; offColor?: ColorInput; withNerdfont?: boolean; } export function Toggle(props: ToggleProps) { const onColor = () => props.onColor ?? theme.success; const offColor = () => props.offColor ?? theme.muted; const nerdFonts = () => props.withNerdfont ?? theme.nerdFonts; return ( {props.on ? "on" : "off"} } > ); }