Skip to content

Commit 91e4b67

Browse files
committed
Move consent checkbox to Consent folder and rename, udpate tests to new webComponent approach, factor out state handling from component to central consent store
1 parent 0d93730 commit 91e4b67

21 files changed

Lines changed: 989 additions & 1454 deletions

File tree

src/components/Consent/Banner/client/__tests__/cookies.spec.ts

Lines changed: 0 additions & 82 deletions
This file was deleted.

src/components/Consent/Banner/client/__tests__/state.spec.ts

Lines changed: 0 additions & 57 deletions
This file was deleted.

src/components/Consent/Banner/client/cookies.ts

Lines changed: 0 additions & 64 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
import ConsentCheckbox, { type Props as ConsentCheckboxProps } from '@components/Consent/Checkbox/index.astro'
3+
4+
export interface CheckboxFixtureProps extends ConsentCheckboxProps {
5+
formId?: string
6+
}
7+
8+
const props: CheckboxFixtureProps = {
9+
purpose: 'Responding to your inquiry',
10+
...Astro.props,
11+
}
12+
---
13+
14+
<form id="gdpr-consent-form" data-testid="gdpr-consent-form">
15+
<ConsentCheckbox {...props} />
16+
<button type="submit">Submit</button>
17+
</form>

0 commit comments

Comments
 (0)