chore(ui): extract shared inputCls + btnCls to ui/form.tsx
The standard input style was copy-pasted verbatim into 5 components (DownloadCenter/DownloadDialog/ProfileEditor/ShareDialog/VideoEditor) and the text-button style into 2 (ShareDialog/VideoEditor). Export both from ui/form.tsx and import them. Byte-identical strings → no visual change. The settings-family panels (Settings/Config/Setup/Welcome) use a DIFFERENT input style (bg-card/rounded-xl/focus:border-accent); unifying the two is a design call left to the glass-consistency epic, not this DRY extract.
This commit is contained in:
parent
8cbaf1d731
commit
1efd089749
6 changed files with 22 additions and 20 deletions
|
|
@ -4,6 +4,17 @@ import Tooltip from "../Tooltip";
|
|||
// Shared form/settings primitives, factored out of the many panels that each re-declared
|
||||
// them (Settings, Config, Stats, admin pages, Setup wizard). Visual contract unchanged.
|
||||
|
||||
/** The standard text/select/number input style (full-width, surface bg, accent focus ring) — the
|
||||
* literal string was copy-pasted into DownloadCenter/DownloadDialog/ProfileEditor/ShareDialog/
|
||||
* VideoEditor. NOTE: the settings-family panels (Settings/Config/Setup/Welcome) use a DIFFERENT
|
||||
* `bg-card rounded-xl focus:border-accent` style; unifying the two is a design call left to the
|
||||
* glass-consistency epic, not this DRY extract. */
|
||||
export const inputCls =
|
||||
"w-full rounded-lg bg-surface border border-border px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-accent/40";
|
||||
|
||||
/** The standard text button style (used verbatim by ShareDialog + VideoEditor). */
|
||||
export const btnCls = "px-3 py-1.5 rounded-lg text-sm font-medium transition disabled:opacity-50";
|
||||
|
||||
/** Pill on/off switch — the bare control; compose it with your own label/row. Pass `label` for
|
||||
* the accessible name (the visible row text) since the control itself has no inner text. */
|
||||
export function Switch({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue