| | 0 | 1 | | export function PanelHeader({ label, actions, onClose }: { |
| | | 2 | | label: React.ReactNode; |
| | | 3 | | actions?: React.ReactNode; |
| | | 4 | | onClose: () => void; |
| | | 5 | | }) { |
| | 0 | 6 | | return ( |
| | | 7 | | <div style={{ |
| | | 8 | | padding: "10px 16px", borderBottom: "1px solid var(--c-border)", |
| | | 9 | | display: "flex", alignItems: "center", justifyContent: "space-between", |
| | | 10 | | flexShrink: 0, |
| | | 11 | | }}> |
| | | 12 | | <span style={{ fontSize: 11, color: "var(--c-fg-3)", fontFamily: "ui-monospace, monospace" }}> |
| | | 13 | | {label} |
| | | 14 | | </span> |
| | | 15 | | <div style={{ display: "flex", alignItems: "center", gap: 6 }}> |
| | | 16 | | {actions} |
| | | 17 | | <button onClick={onClose} style={{ |
| | | 18 | | border: "none", background: "transparent", color: "var(--c-fg-3)", |
| | | 19 | | fontSize: 18, cursor: "pointer", lineHeight: 1, padding: "0 4px", |
| | | 20 | | borderRadius: 4, fontFamily: "inherit", |
| | | 21 | | }}>×</button> |
| | | 22 | | </div> |
| | | 23 | | </div> |
| | | 24 | | ); |
| | | 25 | | } |
| | | 26 | | |
| | 0 | 27 | | export function DrawerField({ label, value }: { label: string; value: React.ReactNode }) { |
| | 0 | 28 | | if (!value) return null; |
| | 0 | 29 | | return ( |
| | | 30 | | <div style={{ |
| | | 31 | | display: "flex", justifyContent: "space-between", alignItems: "center", |
| | | 32 | | padding: "6px 0", borderBottom: "1px solid var(--c-border-2)", fontSize: 13, |
| | | 33 | | }}> |
| | | 34 | | <span style={{ color: "var(--c-fg-3)" }}>{label}</span> |
| | | 35 | | <span style={{ color: "var(--c-fg)", fontWeight: 500 }}>{value}</span> |
| | | 36 | | </div> |
| | | 37 | | ); |
| | | 38 | | } |
| | | 39 | | |
| | 0 | 40 | | export function FormField({ label, children }: { label: string; children: React.ReactNode }) { |
| | 0 | 41 | | return ( |
| | | 42 | | <div style={{ display: "flex", flexDirection: "column", gap: 4 }}> |
| | | 43 | | <label style={{ fontSize: 11, fontWeight: 500, color: "var(--c-fg-2)", textTransform: "uppercase", letterSpacing: |
| | | 44 | | {label} |
| | | 45 | | </label> |
| | | 46 | | {children} |
| | | 47 | | </div> |
| | | 48 | | ); |
| | | 49 | | } |