Media

"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 }}
/>
TwebBlockMediaControl.Render
{ attributes.testMedia && (
<TwebBlockMediaControl.Render
mediaId={ attributes.testMedia }
isBackground={ false }
className="test-media"
/>
) }
Last updated
Was this helpful?