/** * External dependencies */ import classNames from 'classnames'; import { useInstanceId } from '@wordpress/compose'; /** * Internal dependencies */ import './style.scss'; export type CheckboxControlProps = { className?: string; label?: string | React.ReactNode; id?: string; onChange: ( value: boolean ) => void; children?: React.ReactChildren; hasError?: boolean; checked?: boolean; disabled?: string | boolean | undefined; }; /** * Component used to show a checkbox control with styles. */ export const CheckboxControl = ( { className, label, id, onChange, children, hasError = false, checked = false, disabled = false, ...rest }: CheckboxControlProps & Record< string, unknown > ): JSX.Element => { const instanceId = useInstanceId( CheckboxControl ); const checkboxId = id || `checkbox-control-${ instanceId }`; return (
); }; export default CheckboxControl;