From 3877bcfc216232f9816787d413eed263efe983c9 Mon Sep 17 00:00:00 2001 From: balibabu Date: Mon, 12 May 2025 19:39:37 +0800 Subject: [PATCH] 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) --- .../dynamic-page-range.tsx | 9 ++- .../components/chunk-method-dialog/index.tsx | 74 ++++++++++--------- web/src/components/form-container.tsx | 21 ++++++ .../components/slider-input-form-field.tsx | 26 +++---- web/src/components/ui/dual-range-slider.tsx | 3 +- web/src/components/ui/form.tsx | 2 +- 6 files changed, 81 insertions(+), 54 deletions(-) create mode 100644 web/src/components/form-container.tsx diff --git a/web/src/components/chunk-method-dialog/dynamic-page-range.tsx b/web/src/components/chunk-method-dialog/dynamic-page-range.tsx index e833e13d9..d8890828f 100644 --- a/web/src/components/chunk-method-dialog/dynamic-page-range.tsx +++ b/web/src/components/chunk-method-dialog/dynamic-page-range.tsx @@ -13,6 +13,7 @@ import { Input } from '@/components/ui/input'; import { Plus, Trash2 } from 'lucide-react'; import { useFieldArray, useFormContext } from 'react-hook-form'; import { useTranslation } from 'react-i18next'; +import { Separator } from '../ui/separator'; export function DynamicPageRange() { const { t } = useTranslation(); @@ -31,7 +32,7 @@ export function DynamicPageRange() { {fields.map((field, index) => { const typeField = `parser_config.pages.${index}.from`; return ( -
+
@@ -49,6 +51,7 @@ export function DynamicPageRange() { )} /> + @@ -75,9 +79,8 @@ export function DynamicPageRange() { })}