-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new components for client-deliberation.
- Loading branch information
Showing
13 changed files
with
262 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
18
stories/client-deliberation/IntegrateBoxAndConclusion.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: () => {}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
} |