Radio
Last updated
Was this helpful?
Last updated
Was this helpful?
/**
* @param {string} [label] - Component label.
* @param {string} [help] - Component description.
* @param {object} choices - Object containing key-value pairs options.
* @param {string} name - Attribute name.
* @param {object} attributes - Object containing block attributes.
* @param {function} setAttributes - Function to set new block attribute values.
*/
"testRadio": {
"type": "string",
"default": "choice1"
}
import {
TwebBlockRadioControl,
} from '@tigriweb/components/attributes';
<TwebBlockRadioControl
label={ __('Radio Label', 'your-theme-name') }
help={ __('Radio Description', 'your-theme-name') }
choices={ {
'choice1': __('Choise 1', 'your-theme-name'),
'choice2': __('Choise 2', 'your-theme-name'),
'choice3': __('Choise 3', 'your-theme-name'),
} }
name="testRadio"
{ ...{ attributes, setAttributes } }
/>