Update Storybook default values
parent
493efad203
commit
03ca28caae
|
@ -2,24 +2,26 @@ import React from 'react';
|
||||||
|
|
||||||
import { storiesOf } from '@storybook/react';
|
import { storiesOf } from '@storybook/react';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
import { withKnobs, text, boolean, number } from '@storybook/addon-knobs';
|
import { withKnobs, text, boolean, number, select, color } from '@storybook/addon-knobs';
|
||||||
|
|
||||||
import { Picker, Emoji } from '../src';
|
import { Picker, Emoji } from '../src';
|
||||||
import '../css/emoji-mart.css';
|
import '../css/emoji-mart.css';
|
||||||
|
|
||||||
|
const SETS = ['apple', 'google', 'twitter', 'emojione', 'messenger', 'facebook']
|
||||||
|
|
||||||
storiesOf('Picker', module)
|
storiesOf('Picker', module)
|
||||||
.addDecorator(withKnobs)
|
.addDecorator(withKnobs)
|
||||||
.add('default', () => (
|
.add('default', () => (
|
||||||
<Picker
|
<Picker
|
||||||
onClick={action('clicked')}
|
onClick={action('clicked')}
|
||||||
set={text('Emoji pack', 'twitter')}
|
native={boolean('Unicode', true)}
|
||||||
|
set={select('Emoji pack', SETS, SETS[0])}
|
||||||
emojiSize={number('Emoji size', 24)}
|
emojiSize={number('Emoji size', 24)}
|
||||||
perLine={number('Per line', 9)}
|
perLine={number('Per line', 9)}
|
||||||
native={boolean('Unicode', false)}
|
|
||||||
title={text('Idle text', 'Your Title Here')}
|
title={text('Idle text', 'Your Title Here')}
|
||||||
emoji={text('Idle emoji', 'department_store')}
|
emoji={text('Idle emoji', 'department_store')}
|
||||||
skin={number('Skin tone', 1)}
|
skin={number('Skin tone', 1)}
|
||||||
color={text('Highlight color', '#ae65c5')}
|
color={color('Highlight color', '#ae65c5')}
|
||||||
/>
|
/>
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -27,10 +29,10 @@ storiesOf('Emoji', module)
|
||||||
.addDecorator(withKnobs)
|
.addDecorator(withKnobs)
|
||||||
.add('default', () => (
|
.add('default', () => (
|
||||||
<Emoji
|
<Emoji
|
||||||
set={text('Emoji pack', 'twitter')}
|
native={boolean('Unicode', true)}
|
||||||
|
set={select('Emoji pack', SETS, SETS[0])}
|
||||||
emoji={text('Emoji', '+1')}
|
emoji={text('Emoji', '+1')}
|
||||||
size={number('Emoji size', 64)}
|
size={number('Emoji size', 64)}
|
||||||
skin={number('Skin tone', 1)}
|
skin={number('Skin tone', 1)}
|
||||||
native={boolean('Unicode', false)}
|
|
||||||
/>
|
/>
|
||||||
));
|
));
|
||||||
|
|
Loading…
Reference in New Issue