Skip to content

Commit

Permalink
Added new components for client-deliberation.
Browse files Browse the repository at this point in the history
  • Loading branch information
patcon committed Oct 8, 2024
1 parent 95b1653 commit 5548345
Show file tree
Hide file tree
Showing 13 changed files with 262 additions and 1 deletion.
12 changes: 12 additions & 0 deletions stories/client-deliberation/ArrowIcon.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'
import ArrowIcon from '../../polis-UT-HAI/client-deliberation/src/components/ArrowIcon'

export default {
title: 'Client-Deliberation/ArrowIcon',
component: ArrowIcon,
}

const Template = (args) => <ArrowIcon {...args} />

export const Default = Template.bind({})
Default.args = {}
10 changes: 9 additions & 1 deletion stories/client-deliberation/IndividualDeliberation.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@ export default {
title: 'Client-Deliberation/IndividualDeliberation',
component: IndividualDeliberation,
decorators: [withDelibThemeUi],
argTypes: {
currentIndex: {
options: [0, 1, 2],
control: { type: 'inline-radio' },
},
},
}

const Template = (args) => <IndividualDeliberation {...args} />

export const Default = Template.bind({})
Default.args = {}
Default.args = {
currentIndex: 0,
}
18 changes: 18 additions & 0 deletions stories/client-deliberation/IntegrateBox.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react'
import IntegrateBox from '../../polis-UT-HAI/client-deliberation/src/components/IntegrateBox'
import { withDelibThemeUi } from '../../.storybook/decorators'

export default {
title: 'Client-Deliberation/IntegrateBox',
component: IntegrateBox,
decorators: [withDelibThemeUi],
}

const Template = (args) => <IntegrateBox {...args} />

export const Default = Template.bind({})
Default.args = {
heading: "Some heading",
description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
items: ["Some bullet", "Some other bullet", "Yet another bullet"],
}
18 changes: 18 additions & 0 deletions stories/client-deliberation/IntegrateBoxAndConclusion.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react'
import IntegrateBoxAndConclusion from '../../polis-UT-HAI/client-deliberation/src/components/IntegrateBoxAndConclusion'
import { withDelibThemeUi } from '../../.storybook/decorators'
import { Default as DefaultIntegrateBoxStory } from './IntegrateBox.stories'

export default {
title: 'Client-Deliberation/IntegrateBoxAndConclusion',
component: IntegrateBoxAndConclusion,
decorators: [withDelibThemeUi],
}

const Template = (args) => <IntegrateBoxAndConclusion {...args} />

export const Default = Template.bind({})
Default.args = {
...DefaultIntegrateBoxStory.args,
conclusion: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
}
16 changes: 16 additions & 0 deletions stories/client-deliberation/IntegrateLink.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react'
import IntegrateLink from '../../polis-UT-HAI/client-deliberation/src/components/IntegrateLink'
import { withDelibThemeUi } from '../../.storybook/decorators'

export default {
title: 'Client-Deliberation/IntegrateLink',
component: IntegrateLink,
decorators: [withDelibThemeUi],
}

const Template = (args) => <IntegrateLink {...args} />

export const Default = Template.bind({})
Default.args = {
link: '<script async src="https://example.com/embed.js"></script>',
}
16 changes: 16 additions & 0 deletions stories/client-deliberation/Lock.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react'
import Lock from '../../polis-UT-HAI/client-deliberation/src/components/Lock'

export default {
title: 'Client-Deliberation/Lock',
component: Lock,
}

const Template = (args) => <Lock {...args} />

export const Default = Template.bind({})
Default.args = {
style: {
fill: "blue",
},
}
14 changes: 14 additions & 0 deletions stories/client-deliberation/ObtainLink.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react'
import ObtainLink from '../../polis-UT-HAI/client-deliberation/src/components/ObtainLink'
import { withDelibThemeUi } from '../../.storybook/decorators'

export default {
title: 'Client-Deliberation/ObtainLink',
component: ObtainLink,
decorators: [withDelibThemeUi],
}

const Template = (args) => <ObtainLink {...args} />

export const Default = Template.bind({})
Default.args = {}
18 changes: 18 additions & 0 deletions stories/client-deliberation/PolisButton.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react'
import PolisButton from '../../polis-UT-HAI/client-deliberation/src/components/PolisButton'
import { action } from '@storybook/addon-actions'
import { withDelibThemeUi } from '../../.storybook/decorators'

export default {
title: 'Client-Deliberation/PolisButton',
component: PolisButton,
decorators: [withDelibThemeUi],
}

const Template = (args) => <PolisButton {...args} />

export const Default = Template.bind({})
Default.args = {
onClick: action("Clicked!"),
buttonText: "Click me",
}
31 changes: 31 additions & 0 deletions stories/client-deliberation/Sidebar.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from 'react'
import Sidebar from '../../polis-UT-HAI/client-deliberation/src/components/Sidebar'
import { withDelibThemeUi } from '../../.storybook/decorators'
import { action } from '@storybook/addon-actions'

export default {
title: 'Client-Deliberation/Sidebar',
component: Sidebar,
decorators: [withDelibThemeUi],
}

const Template = (args) => <Sidebar {...args} />

export const Default = Template.bind({})
Default.args = {
onModuleClick: action("Clicked!"),
modules: [
{
name: "Some module",
progress: 20, // percent
currently_displayed: true,
not_completed: true,
},
{
name: "Another module",
progress: 50, // percent
currently_displayed: true,
not_completed: true,
},
],
}
30 changes: 30 additions & 0 deletions stories/client-deliberation/SidebarModule.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react'
import SidebarModule from '../../polis-UT-HAI/client-deliberation/src/components/SidebarModule'
import Sidebar from '../../polis-UT-HAI/client-deliberation/src/components/Sidebar'
import { withDelibThemeUi } from '../../.storybook/decorators'
import { action } from '@storybook/addon-actions'

export default {
title: 'Client-Deliberation/SidebarModule',
component: SidebarModule,
decorators: [withDelibThemeUi],
}

const Template = (args) => <Sidebar modules={[
{...args},
{
name: "Another module",
progress: 50, // percent
currently_displayed: false,
not_completed: true,
}]}
onModuleClick={action("Clicked!")}
/>

export const Default = Template.bind({})
Default.args = {
name: "Some module",
progress: 20, // percent
currently_displayed: true,
not_completed: true,
}
26 changes: 26 additions & 0 deletions stories/client-deliberation/TreeSummary.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react'
import TreeSummary from '../../polis-UT-HAI/client-deliberation/src/components/TreeSummary'
import { action } from '@storybook/addon-actions'
import { withDelibThemeUi } from '../../.storybook/decorators'

export default {
title: 'Client-Deliberation/TreeSummary',
component: TreeSummary,
decorators: [withDelibThemeUi],
}

const Template = (args) => <TreeSummary {...args} />

export const Default = Template.bind({})
Default.args = {
topics: [
"topic 1",
"topic 2",
],
onButtonClick: action("Clicked!"),
onBack: action("Go Back!"),
topicsHistory: [
["topic 1"],
"topic 2",
],
}
28 changes: 28 additions & 0 deletions stories/client-deliberation/Tutorial.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from 'react'
import Tutorial from '../../polis-UT-HAI/client-deliberation/src/components/Tutorial'
import { action } from '@storybook/addon-actions'
import { withDelibThemeUi } from '../../.storybook/decorators'

export default {
title: 'Client-Deliberation/Tutorial',
component: Tutorial,
decorators: [withDelibThemeUi],
argTypes: {
currentIndexpage: {
options: [0, 1, 2, 3],
control: { type: 'inline-radio' },
},
},
}

const Template = (args) => <Tutorial {...args} />

export const Default = Template.bind({})
Default.args = {
email: null,
currentIndex: 0,
tutorialprogress: 0,
setCurrentIndex: action("Set index!"),
currentIndexpage: 0,
setnextButtonState: () => {},
}
26 changes: 26 additions & 0 deletions stories/client-deliberation/Tutorials.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react'
import Tutorials from '../../polis-UT-HAI/client-deliberation/src/components/Tutorials'
import { action } from '@storybook/addon-actions'
import { withDelibThemeUi } from '../../.storybook/decorators'

export default {
title: 'Client-Deliberation/Tutorials',
component: Tutorials,
decorators: [withDelibThemeUi],
argTypes: {
current_state_index: {
options: [0, 1, 2, 3, 4],
control: { type: 'inline-radio' },
},
},
}

const Template = (args) => <Tutorials {...args} />

export const Default = Template.bind({})
Default.args = {
email: null,
current_state_index: 0,
setcurrent_state_index: action("Set index!"),
heading: "Some Tutorial",
}

0 comments on commit 5548345

Please sign in to comment.