From 9f3327f79d7b57909a906f42a83fedc98ece1ab5 Mon Sep 17 00:00:00 2001 From: Drikus Roor Date: Tue, 13 Feb 2024 11:02:49 +0100 Subject: [PATCH] story: Add Consent component and default story --- frontend/src/stories/Consent.stories.js | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 frontend/src/stories/Consent.stories.js diff --git a/frontend/src/stories/Consent.stories.js b/frontend/src/stories/Consent.stories.js new file mode 100644 index 000000000..14be6c4dc --- /dev/null +++ b/frontend/src/stories/Consent.stories.js @@ -0,0 +1,43 @@ + +import Consent from '../components/Consent/Consent'; + +const defaultArgs = { + title: "This is the title", + text: "This is the text", + onNext: () => {console.log("Next button clicked")}, + confirm: "Confirm", + deny: "Deny", + experiment: { + slug: "experiment-slug", + } +} + +const getArgs = (args = {}) => ({ ...defaultArgs, ...args }); + +export default { + title: 'Consent', + component: Consent, + parameters: { + layout: 'fullscreen', + }, +}; + +export const Default = { + args: { + title: "This is the Consent component's title", + text: "

This is the Consent component's text

It can contain lists, headings, bold, italic and underlined text, you name it!

", + onNext: () => {console.log("On next triggered")}, + confirm: "Confirm", + deny: "Deny", + experiment: { + slug: "experiment-slug", + } + }, + decorators: [ + (Story) => ( +
+ +
+ ), + ], +};