/
index.js
31 lines (27 loc) · 1.07 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import React from 'react';
import { boolean, text, object } from '@storybook/addon-knobs';
import { action } from '@storybook/addon-actions';
import readme from './README.md';
import Avatar from '../../../components/molecules/Avatar';
const options = [
{ name: 'Change Password', path: '/account/change-password' },
{ name: 'Change Brand', path: '/account/change-brand' },
{ name: 'Login to Twitter', path: '/account/twitter-login' },
{ name: 'Switch to Annotator', path: '/account/instagram-login' },
{ name: 'Logout', path: 'logout' }
];
const component = () => (
<div style={{ minHeight: 100 }}>
<Avatar
open={boolean('Open', false)}
menuCallback={action('avatar_menu_toggled')}
optionCallback={action('avatar_menu_option_clicked')}
username={text('Username', 'Michele')}
img={text('Image url', '')}
menuOptions={options}
className={text('ClassName', '-float-right')}
style={object('Style', {})}
/>
</div>
);
export default [readme, component];