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:
@@ -18,8 +18,6 @@ import type { CatalogField } from "~/lib/blueprint-field-catalog.js";
|
||||
// Styles
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const INPUT_CLS = "app-input";
|
||||
|
||||
const BTN_PRIMARY =
|
||||
"px-4 py-2 bg-brand-600 text-white rounded-lg hover:bg-brand-700 text-sm font-medium disabled:opacity-50";
|
||||
|
||||
@@ -496,7 +494,7 @@ export function BlueprintFieldCatalog({
|
||||
value={searchQuery}
|
||||
onChange={(e) => setSearchQuery(e.target.value)}
|
||||
placeholder="Search fields..."
|
||||
className={`${INPUT_CLS} w-full`}
|
||||
className="app-input"
|
||||
autoFocus
|
||||
/>
|
||||
</div>
|
||||
@@ -636,7 +634,7 @@ export function BlueprintFieldCatalog({
|
||||
)
|
||||
}
|
||||
placeholder="field_key"
|
||||
className={`${INPUT_CLS} font-mono`}
|
||||
className="app-input font-mono"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col gap-1">
|
||||
@@ -651,7 +649,7 @@ export function BlueprintFieldCatalog({
|
||||
setCustomLabel(e.target.value)
|
||||
}
|
||||
placeholder="Display Label"
|
||||
className={INPUT_CLS}
|
||||
className="app-input"
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col gap-1">
|
||||
@@ -665,7 +663,7 @@ export function BlueprintFieldCatalog({
|
||||
e.target.value as FieldType,
|
||||
)
|
||||
}
|
||||
className={INPUT_CLS}
|
||||
className="app-input"
|
||||
>
|
||||
{FIELD_TYPES.map((ft) => (
|
||||
<option key={ft.value} value={ft.value}>
|
||||
|
||||
Reference in New Issue
Block a user