astro-reactive-form/packages/astro-reactive-form/components/FieldSet.astro
2022-10-01 14:32:34 +02:00

15 lines
312 B
Text

---
import type { FormGroup } from '../core/form-group';
import Field from './Field.astro';
export interface Props {
group: FormGroup;
}
const { group } = Astro.props;
---
<fieldset>
{group.name && <legend>{group.name}</legend>}
{group?.controls?.map((control) => <Field control={control} />)}
</fieldset>