Checkbox
Last updated
Last updated
/**
* @param {string} [label] - Component label.
* @param {string} [help] - Component description.
* @param {string} name - Attribute name.
* @param {function} [onChange] - Callback called when the value changes.
* @param {object} attributes - Object containing block attributes.
* @param {function} setAttributes - Function to set new block attribute values.
*/
"testCheckbox": {
"type": "boolean",
"default": true
}
import {
TwebBlockCheckboxControl,
} from '@tigriweb/components/attributes';
<TwebBlockCheckboxControl
label={ __('Checkbox Label', 'your-theme-name') }
help={ __('Checkbox Description', 'your-theme-name') }
name="testCheckbox"
{...{ attributes, setAttributes }}
/>