Text

TwebBlockTextControl

{ label, help, name*, onChange, attributes*, setAttributes* }
/**
 * @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.
 */
block.json
"testText": {
	"type": "string",
	"default": ""
}
index.js
import {
	TwebBlockTextControl,
} from '@tigriweb/components/attributes';
index.js | edit()
<TwebBlockTextControl
	label={ __('Text Label', 'your-theme-name') }
	help={ __('Text Description', 'your-theme-name') }
	name="testText"
	{ ...{ attributes, setAttributes } }
/>

Last updated

Was this helpful?