-
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.
- Loading branch information
Showing
2 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
Submodule polis
updated
6 files
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,47 @@ | ||
import React from 'react' | ||
import { action } from '@storybook/addon-actions' | ||
import * as globals from '../../polis/client-participation/vis2/components/globals' | ||
import { Button as CurateButton } from '../../polis/client-participation/vis2/components/curate' | ||
|
||
export default { | ||
title: 'Client-Participation/CurateButton', | ||
component: CurateButton, | ||
} | ||
|
||
const Template = (args) => <CurateButton {...args} /> | ||
|
||
export const Default = Template.bind({}) | ||
Default.args = { | ||
selectedTidCuration: null, | ||
handleCurateButtonClick: action('Clicked'), | ||
identifier: "default-identifier", | ||
children: "Button", | ||
} | ||
|
||
export const LongLabelSelected = Template.bind({}) | ||
LongLabelSelected.args = { | ||
...Default.args, | ||
identifier: "long-identifier", | ||
selectedTidCuration: "long-identifier", | ||
children: "Really Long Button", | ||
} | ||
|
||
export const LongLabelNoneSelected = Template.bind({}) | ||
LongLabelNoneSelected.args = { | ||
...LongLabelSelected.args, | ||
selectedTidCuration: null, | ||
} | ||
|
||
export const LongLabelOtherSelected = Template.bind({}) | ||
LongLabelOtherSelected.args = { | ||
...LongLabelSelected.args, | ||
selectedTidCuration: "other-identifier", | ||
} | ||
|
||
export const MajoritySelected = Template.bind({}) | ||
MajoritySelected.args = { | ||
...Default.args, | ||
identifier: globals.tidCuration.majority, | ||
selectedTidCuration: globals.tidCuration.majority, | ||
children: "Majority Opinion", | ||
} |