File "index.js"

Full Path: /home/vantageo/public_html/cache/cache/.wp-cli/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/quantity-selector/stories/index.js
File size: 598 bytes
MIME-type: text/x-java
Charset: utf-8

/**
 * External dependencies
 */
import { boolean } from '@storybook/addon-knobs';
import { useState } from 'react';

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

export default {
	title: 'WooCommerce Blocks/@base-components/QuantitySelector',
	component: QuantitySelector,
};

export const Default = () => {
	const [ quantity, changeQuantity ] = useState();

	return (
		<div style={ { width: 100 } }>
			<QuantitySelector
				disabled={ boolean( 'Disabled', false ) }
				quantity={ quantity }
				onChange={ changeQuantity }
				itemName="widgets"
			/>
		</div>
	);
};