Adds all expert settings

This commit is contained in:
inpsyde-maticluznar 2024-11-12 10:12:31 +01:00
parent 51b7b48381
commit e72cc8a213
No known key found for this signature in database
GPG key ID: D005973F231309F6
6 changed files with 101 additions and 11 deletions

View file

@ -1,4 +1,4 @@
import { Button, ToggleControl, Dropdown } from '@wordpress/components';
import { Button, ToggleControl, SelectControl } from '@wordpress/components';
import data from '../../utils/data';
import { useState } from '@wordpress/element';
@ -113,7 +113,22 @@ const SettingsBlock = ( {
</div>
) }
{ actionProps?.type === SETTINGS_BLOCK_TYPE_SELECT && (
<Dropdown />
<SelectControl
className={
actionProps.value === '' &&
'ppcp-r-select-no-value-assigned'
}
value={ actionProps.value }
options={ actionProps?.options }
multiple={ true }
onChange={ ( newValue ) =>
actionProps?.callback &&
actionProps.callback(
actionProps?.key,
newValue
)
}
/>
) }
</div>
</div>