import { __, sprintf } from '@wordpress/i18n'; import { Icon, TextareaControl } from '@wordpress/components'; import { useState } from '@wordpress/element'; import { info as infoIcon } from '@wordpress/icons'; import { dispatch } from '@wordpress/data'; const Settings = ( { test = {} } ) => { const [ testState, setTestState ] = useState( { hide_css_selectors: '', ...test, } ); const updateTest = ( value ) => { const updatedTest = { ...testState, hide_css_selectors: value }; test.hide_css_selectors = value; setTestState( updatedTest ); return dispatch( 'core/editor' ).editPost( { vrts: { hide_css_selectors: value }, } ); }; return ( <>
{ __(
'Hide elements from VRTs',
'visual-regression-tests'
) }