import * as React from 'react' import {__, _x} from '@wordpress/i18n' import { useContext, } from '@wordpress/element' import { ToggleControl, } from '@wordpress/components' import { TailwindFeatureContext, } from '..' import type { ControlProps, } from '.' const Toggle: React.FC = ({ label, variant, valueKey, value, dispatch, }) => { const { id, } = useContext(TailwindFeatureContext) return ( { dispatch.setVariantValue({ feature: id, variant, key: valueKey, value: value === 'DEFAULT' ? '' : 'DEFAULT', }) }} __nextHasNoMarginBottom /> ) } export default Toggle