From 97128a0816aa4b53d979775e317e03bde6ef6f0c Mon Sep 17 00:00:00 2001 From: jmakhack Date: Thu, 6 Oct 2022 10:07:02 -0400 Subject: [PATCH] feat: implement form submit button limit (#47) * feat: implement form submit button limit * feat: add submit control to form --- packages/astro-reactive-form/Form.astro | 7 +++++-- packages/astro-reactive-form/core/form-group.ts | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/astro-reactive-form/Form.astro b/packages/astro-reactive-form/Form.astro index a4e3fbb..53e60fc 100644 --- a/packages/astro-reactive-form/Form.astro +++ b/packages/astro-reactive-form/Form.astro @@ -1,15 +1,18 @@ --- -import type { FormGroup } from './core'; +import type { FormControl, FormGroup } from './core'; +import Field from './components/Field.astro'; import FieldSet from './components/FieldSet.astro'; export interface Props { + submitControl?: FormControl; formGroups: FormGroup[]; } -const { formGroups } = Astro.props; +const { submitControl, formGroups } = Astro.props; ---
{formGroups?.map((group) =>
)} + {submitControl && ()}