Skip to content

Commit

Permalink
Add color picker component to Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaz committed Oct 24, 2019
1 parent bef4943 commit c68f559
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/components/src/color-picker/stories/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

/**
* WordPress dependencies
*/
import { useState } from '@wordpress/element';

/**
* Internal dependencies
*/
import ColorPicker from '../';

export default { title: 'ColorPicker', component: ColorPicker };

export const _default = () => {
const [ color, setColor ] = useState( '#f00' );
return (
<ColorPicker
color={ color }
onChangeComplete={ ( value ) => setColor( value.hex ) }
disableAlpha
/>
);
};

0 comments on commit c68f559

Please sign in to comment.