import React from "react"; import { Pencil } from "lucide-react"; /** A card that shows settings as text, with an Edit button that opens their popup. */ export function ReadCard({ title, onEdit, editLabel = "Edit", actions, children }: { title: React.ReactNode; onEdit?: () => void; editLabel?: string; actions?: React.ReactNode; children: React.ReactNode; }) { return (

{title}

{actions} {onEdit && }
{children}
); } /** One "label: value" row of a read view; a blank value shows as a dash. */ export function Field({ label, children, wide }: { label: string; children: React.ReactNode; wide?: boolean }) { const empty = children == null || children === "" || children === false; return (
{label}
{empty ? "—" : children}
); } export function Fields({ children }: { children: React.ReactNode }) { return
{children}
; } /** Save and Cancel at the foot of a popup form. */ export function ModalButtons({ busy, onCancel, label = "Save" }: { busy: boolean; onCancel: () => void; label?: string }) { return (
); }