/** * External Dependencies */ import { __ } from '@wordpress/i18n'; import { Dropdown, MenuItem, NavigableMenu, Path, SVG, Toolbar } from '@wordpress/components'; /** * Internal dependencies */ import { AD_FORMATS } from './constants'; const label = __( 'Pick an ad format', 'jetpack' ); export default function FormatPicker( { value, onChange } ) { return ( { return ( ), title: label, onClick: onToggle, extraProps: { 'aria-expanded': isOpen }, className: 'wp-block-jetpack-wordads__format-picker-icon', }, ] } /> ); } } renderContent={ ( { onClose } ) => ( { AD_FORMATS.map( ( { tag, name, icon } ) => ( { onChange( tag ); onClose(); } } role="menuitemcheckbox" > { name } ) ) } ) } /> ); }