Skip to content

Commit

Permalink
Add the storybook story for the CustomGradientPicker component
Browse files Browse the repository at this point in the history
  • Loading branch information
brentswisher committed Apr 17, 2020
1 parent 5e3457f commit a94e078
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions packages/components/src/custom-gradient-picker/stories/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* WordPress dependencies
*/
import { useState } from '@wordpress/element';

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

export default {
title: 'Components/CustomGradientPicker',
component: CustomGradientPicker,
};

const CustomGradientPickerWithState = ( props ) => {
const [ gradient, setGradient ] = useState();
return (
<CustomGradientPicker
{ ...props }
value={ gradient }
onChange={ setGradient }
/>
);
};

export const _default = () => {
return <CustomGradientPickerWithState />;
};

0 comments on commit a94e078

Please sign in to comment.