Skip to content

Commit

Permalink
Add stories
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Aug 17, 2022
1 parent 0c1705e commit 7f8e461
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* WordPress dependencies
*/
import { useState } from '@wordpress/element';

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

export default {
title: 'BlockEditor/TextDecorationControl',
component: TextDecorationControl,
argTypes: {
onChange: { action: 'onChange' },
size: {
options: [ 'default', '__unstable-large' ],
control: { type: 'radio' },
},
},
};

const Template = ( { onChange, ...args } ) => {
const [ value, setValue ] = useState();
return (
<TextDecorationControl
{ ...args }
onChange={ ( ...changeArgs ) => {
onChange( ...changeArgs );
setValue( ...changeArgs );
} }
value={ value }
/>
);
};

export const Default = Template.bind( {} );
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* WordPress dependencies
*/
import { useState } from '@wordpress/element';

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

export default {
title: 'BlockEditor/TextTransformControl',
component: TextTransformControl,
argTypes: {
onChange: { action: 'onChange' },
size: {
options: [ 'default', '__unstable-large' ],
control: { type: 'radio' },
},
},
};

const Template = ( { onChange, ...args } ) => {
const [ value, setValue ] = useState();
return (
<TextTransformControl
{ ...args }
onChange={ ( ...changeArgs ) => {
onChange( ...changeArgs );
setValue( ...changeArgs );
} }
value={ value }
/>
);
};

export const Default = Template.bind( {} );

0 comments on commit 7f8e461

Please sign in to comment.