diff --git a/packages/astro-reactive-form/Form.astro b/packages/astro-reactive-form/Form.astro index 434e765..ef2f87e 100644 --- a/packages/astro-reactive-form/Form.astro +++ b/packages/astro-reactive-form/Form.astro @@ -6,12 +6,15 @@ import FieldSet from './components/FieldSet.astro'; export interface Props { submitControl?: Submit; formGroups: FormGroup[]; + theme?: "light" | "dark"; } -const { submitControl, formGroups } = Astro.props; +const { submitControl, formGroups, theme } = Astro.props; + +const formTheme = theme ?? "light"; --- -
diff --git a/packages/astro-reactive-form/test/Form.astro.test.js b/packages/astro-reactive-form/test/Form.astro.test.js index bb3945e..631a2a9 100644 --- a/packages/astro-reactive-form/test/Form.astro.test.js +++ b/packages/astro-reactive-form/test/Form.astro.test.js @@ -1,4 +1,5 @@ import { expect } from 'chai'; +import { describe, beforeEach, it } from 'mocha'; import { getComponentOutput } from 'astro-component-tester'; describe('Form.astro test', () => { @@ -44,12 +45,14 @@ describe('Form.astro test', () => { const expectedCount = 3; const element = /