From bd862fa9cc528105bb48cde6f1329802dfe21675 Mon Sep 17 00:00:00 2001 From: Vladimir Borisov Date: Tue, 17 Sep 2019 09:56:41 +0300 Subject: [PATCH] Example usage of the coor picker --- storybook/stories/ColorPicker/ColorPicker.js | 21 +++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/storybook/stories/ColorPicker/ColorPicker.js b/storybook/stories/ColorPicker/ColorPicker.js index b86938fd4..68057edb8 100644 --- a/storybook/stories/ColorPicker/ColorPicker.js +++ b/storybook/stories/ColorPicker/ColorPicker.js @@ -3,10 +3,17 @@ const { storiesOf } = require('@storybook/react'); const { ColorPicker } = require('stremio/common'); const styles = require('./styles'); -storiesOf('ColorPicker', module).add('ColorPicker', () => ( - { console.log(color) }} - /> -)); +const ColorPickerExampleusage = () => { + const [color, setColor] = React.useState('rgba(166, 196, 213, 0.97)'); + return ( +
+ { setColor(color) }} + /> +
Current color is {color}
+
+ ); +} +storiesOf('ColorPicker', module).add('ColorPicker', () => );