Skip to content

Commit

Permalink
story: Add Consent component and default story
Browse files Browse the repository at this point in the history
  • Loading branch information
drikusroor committed Feb 14, 2024
1 parent 6035d41 commit 9f3327f
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions frontend/src/stories/Consent.stories.js
Original file line number Diff line number Diff line change
@@ -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: "<h2>This is the Consent component's text</h2><p>It can contain lists, headings, bold, italic and underlined text, you name it!</p><ul><li><b>Item 1</b></li><li><i>Item 2</i></li><li><u>Item 3</u></li></ul>",
onNext: () => {console.log("On next triggered")},
confirm: "Confirm",
deny: "Deny",
experiment: {
slug: "experiment-slug",
}
},
decorators: [
(Story) => (
<div style={{ width: '100%', height: '100%', backgroundColor: '#ddd', padding: '1rem' }}>
<Story />
</div>
),
],
};

0 comments on commit 9f3327f

Please sign in to comment.