refactor(ui): replace inline INPUT_CLS/LABEL_CLS/BTN_DANGER constants and action link classes with CSS component classes
Remove duplicated Tailwind class string constants from 15 component files. Use app-input, app-select, app-label, app-action-danger-btn, and app-action-delete CSS component classes from globals.css instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -59,8 +59,6 @@ interface FieldCardProps {
|
||||
// Component
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const INPUT_CLS = "app-input";
|
||||
|
||||
export function FieldCard({ field, overrides, onChange }: FieldCardProps) {
|
||||
const [expanded, setExpanded] = useState(false);
|
||||
|
||||
@@ -193,7 +191,7 @@ export function FieldCard({ field, overrides, onChange }: FieldCardProps) {
|
||||
value={overrides.description}
|
||||
onChange={(e) => update({ description: e.target.value })}
|
||||
placeholder={field.description}
|
||||
className={INPUT_CLS}
|
||||
className="app-input"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -240,7 +238,7 @@ function DefaultValueInput({
|
||||
onChange(e.target.value === "" ? undefined : Number(e.target.value))
|
||||
}
|
||||
placeholder="No default"
|
||||
className={INPUT_CLS}
|
||||
className="app-input"
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -252,7 +250,7 @@ function DefaultValueInput({
|
||||
onChange={(e) =>
|
||||
onChange(e.target.value === "" ? undefined : e.target.value)
|
||||
}
|
||||
className={INPUT_CLS}
|
||||
className="app-input"
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -263,7 +261,7 @@ function DefaultValueInput({
|
||||
onChange={(e) =>
|
||||
onChange(e.target.value === "" ? undefined : e.target.value)
|
||||
}
|
||||
className={INPUT_CLS}
|
||||
className="app-input"
|
||||
>
|
||||
<option value="">No default</option>
|
||||
{(options ?? []).map((opt) => (
|
||||
@@ -292,7 +290,7 @@ function DefaultValueInput({
|
||||
onChange(e.target.value === "" ? undefined : e.target.value)
|
||||
}
|
||||
placeholder="https://..."
|
||||
className={INPUT_CLS}
|
||||
className="app-input"
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -305,7 +303,7 @@ function DefaultValueInput({
|
||||
onChange(e.target.value === "" ? undefined : e.target.value)
|
||||
}
|
||||
placeholder="name@example.com"
|
||||
className={INPUT_CLS}
|
||||
className="app-input"
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -317,7 +315,7 @@ function DefaultValueInput({
|
||||
onChange(e.target.value === "" ? undefined : e.target.value)
|
||||
}
|
||||
placeholder="No default"
|
||||
className={`${INPUT_CLS} resize-none`}
|
||||
className="app-input resize-none"
|
||||
rows={2}
|
||||
/>
|
||||
);
|
||||
@@ -331,7 +329,7 @@ function DefaultValueInput({
|
||||
onChange(e.target.value === "" ? undefined : e.target.value)
|
||||
}
|
||||
placeholder="No default"
|
||||
className={INPUT_CLS}
|
||||
className="app-input"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user