PostType
Last updated
Last updated
/**
* @param {string} [label] - Component label.
* @param {string} [help] - Component description.
* @param {string} postType - The post type name.
* @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.
*/
"testPost": {
"type": "string",
"default": ""
}
import {
TwebBlockPostTypeControl,
} from '@tigriweb/components/attributes';
<TwebBlockPostTypeControl
label={ __('Post Label', 'your-theme-name') }
help={ __('Post Description', 'your-theme-name') }
postType="post"
name="testPost"
{...{ attributes, setAttributes }}
/>