Skip to content

Commit a5a7dfc

Browse files
committed
refactor more form components - cursor-form and os-specific-form
1 parent de1e82a commit a5a7dfc

2 files changed

Lines changed: 10 additions & 19 deletions

File tree

src/components/forms/cursor-form/cursor-form.component.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,15 @@ import { NumberInputComponent } from '../../shared/number-input/number-input.com
66
import { VersionBadgeComponent } from '../../shared/version-badge/version-badge.component';
77
import { ColorInputComponent } from '../../shared/color-input/color-input.component';
88
import { SliderInputComponent } from '../../shared/slider-input/slider-input.component';
9+
import { FormSectionComponent } from '../../shared/form-section/form-section.component';
910
import { createFormHelper } from '../../../utils/form-helpers';
1011
import { KittyVersionService } from '../../../services/kitty-version.service';
1112

1213
@Component({
1314
selector: 'app-cursor-form',
14-
imports: [CommonModule, FormsModule, NumberInputComponent, VersionBadgeComponent, ColorInputComponent, SliderInputComponent],
15+
imports: [CommonModule, FormsModule, NumberInputComponent, VersionBadgeComponent, ColorInputComponent, SliderInputComponent, FormSectionComponent],
1516
template: `
16-
<div class="space-y-6">
17-
<div>
18-
<h2 class="text-2xl font-bold text-kitty-primary mb-2">Cursor</h2>
19-
<p class="text-kitty-text-dim">Customize cursor shape, color, and animation</p>
20-
</div>
21-
22-
<div class="space-y-6 bg-kitty-surface rounded-lg p-6 border border-kitty-border">
17+
<app-form-section title="Cursor" description="Customize cursor shape, color, and animation">
2318
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
2419
<div class="form-group">
2520
<label class="block text-sm font-medium text-kitty-text mb-2">
@@ -222,8 +217,8 @@ import { KittyVersionService } from '../../../services/kitty-version.service';
222217
</div>
223218
</div>
224219
}
225-
</div>
226-
</div>
220+
}
221+
</app-form-section>
227222
`,
228223
styles: []
229224
})

src/components/forms/os-specific-form/os-specific-form.component.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,15 @@ import { CommonModule } from '@angular/common';
33
import { FormsModule } from '@angular/forms';
44
import { SliderInputComponent } from '../../shared/slider-input/slider-input.component';
55
import { NumberInputComponent } from '../../shared/number-input/number-input.component';
6+
import { FormSectionComponent } from '../../shared/form-section/form-section.component';
67
import { createFormHelper } from '../../../utils/form-helpers';
78

89
@Component({
910
selector: 'app-os-specific-form',
10-
imports: [CommonModule, FormsModule, SliderInputComponent, NumberInputComponent],
11+
imports: [CommonModule, FormsModule, SliderInputComponent, NumberInputComponent, FormSectionComponent],
1112
template: `
12-
<div class="space-y-6">
13-
<div>
14-
<h2 class="text-2xl font-bold text-kitty-primary mb-2">OS Specific</h2>
15-
<p class="text-kitty-text-dim">Platform-specific settings for macOS and Linux/Wayland</p>
16-
</div>
17-
18-
<div class="bg-kitty-warning/10 border border-kitty-warning/30 rounded-lg p-4">
13+
<app-form-section title="OS Specific" description="Platform-specific settings for macOS and Linux/Wayland">
14+
<div class="bg-kitty-warning/10 border border-kitty-warning/30 rounded-lg p-4 mb-6">
1915
<p class="text-kitty-warning text-sm">
2016
Settings marked
2117
<span class="inline-flex items-center gap-1 bg-kitty-warning/20 text-kitty-warning px-2 py-0.5 rounded text-xs font-medium">restart required</span>
@@ -272,7 +268,7 @@ import { createFormHelper } from '../../../utils/form-helpers';
272268
}
273269
</div>
274270
</div>
275-
</div>
271+
</app-form-section>
276272
`,
277273
styles: []
278274
})

0 commit comments

Comments
 (0)