Feat: Add FormContainer component #3221 (#7588)

### What problem does this PR solve?

Feat: Add FormContainer component #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-05-12 19:39:37 +08:00
committed by GitHub
parent f8cc557892
commit 3877bcfc21
6 changed files with 81 additions and 54 deletions

View File

@ -38,8 +38,19 @@ export function SliderInputFormField({
defaultValue={defaultValue}
render={({ field }) => (
<FormItem>
<div className="flex items-center justify-between">
<FormLabel tooltip={tooltip}>{label}</FormLabel>
<FormLabel tooltip={tooltip}>{label}</FormLabel>
<div className="flex items-center gap-14 justify-between">
<FormControl>
<SingleFormSlider
{...field}
max={max}
min={min}
step={step}
// defaultValue={
// typeof defaultValue === 'number' ? [defaultValue] : undefined
// }
></SingleFormSlider>
</FormControl>
<FormControl>
<Input
type={'number'}
@ -52,17 +63,6 @@ export function SliderInputFormField({
></Input>
</FormControl>
</div>
<FormControl>
<SingleFormSlider
{...field}
max={max}
min={min}
step={step}
// defaultValue={
// typeof defaultValue === 'number' ? [defaultValue] : undefined
// }
></SingleFormSlider>
</FormControl>
<FormMessage />
</FormItem>
)}