Media
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
"testMedia": {
"type": "integer",
"default": 0
}import {
TwebBlockMediaControl,
} from '@tigriweb/components/attributes';<TwebBlockMediaControl
label={ __('Media Label', 'your-theme-name') }
help={ __('Media Description', 'your-theme-name') }
name="testMedia"
{...{ attributes, setAttributes }}
/>/**
* @param {number} mediaId - The ID of the media item (default: 0).
* @param {boolean} [isBackground] - Should media be rendered as a background image? (default: false).
* @param {string} [className] - Additional CSS class name for the rendered component.
*/{ attributes.testMedia && (
<TwebBlockMediaControl.Render
mediaId={ attributes.testMedia }
isBackground={ false }
className="test-media"
/>
) }