File "index.js"
Full Path: /home/vantageo/public_html/cache/cache/cache/cache/cache/cache/cache/.wp-cli/wp-content/plugins/woocommerce/packages/woocommerce-blocks/assets/js/base/components/checkbox-control/stories/index.js
File size: 537 bytes
MIME-type: text/x-java
Charset: utf-8
/**
* External dependencies
*/
import { text } from '@storybook/addon-knobs';
import { useState } from 'react';
/**
* Internal dependencies
*/
import CheckboxControl from '../';
export default {
title: 'WooCommerce Blocks/@base-components/CheckboxControl',
component: CheckboxControl,
};
export const Default = () => {
const [ checked, setChecked ] = useState( false );
return (
<CheckboxControl
label={ text( 'Label', 'Yes please' ) }
checked={ checked }
onChange={ ( value ) => setChecked( value ) }
/>
);
};