diff --git a/packages/components/src/textarea-control/stories/index.js b/packages/components/src/textarea-control/stories/index.js new file mode 100644 index 00000000000000..64f0d140c6d7c0 --- /dev/null +++ b/packages/components/src/textarea-control/stories/index.js @@ -0,0 +1,45 @@ +/** + * External dependencies + */ +import { boolean, number, text } from '@storybook/addon-knobs'; + +/** + * WordPress dependencies + */ +import { useState } from '@wordpress/element'; + +/** + * Internal dependencies + */ +import TextareaControl from '../'; + +export default { + title: 'Components/TextareaControl', + component: TextareaControl, +}; + +const TextareaControlWithState = ( props ) => { + const [ value, setValue ] = useState(); + + return ( + + ); +}; + +export const _default = () => { + const label = text( 'Label', 'Label Text' ); + const hideLabelFromVision = boolean( 'Hide Label From Vision', false ); + const help = text( 'Help Text', 'Help text to explain the textarea.' ); + const rows = number( 'Rows', 4 ); + const className = text( 'Class Name', '' ); + + return ( + + ); +}; diff --git a/storybook/test/__snapshots__/index.js.snap b/storybook/test/__snapshots__/index.js.snap index d17f24d407078a..3aa1e80d2b0e3f 100644 --- a/storybook/test/__snapshots__/index.js.snap +++ b/storybook/test/__snapshots__/index.js.snap @@ -7993,6 +7993,36 @@ Array [ ] `; +exports[`Storyshots Components/TextareaControl Default 1`] = ` +
+
+ +