@wordpress/components
Version:
UI components for WordPress.
25 lines (24 loc) • 576 B
JavaScript
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
/**
* Computes the common props for the CircularOptionPicker.
*/
export function getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby) {
const metaProps = asButtons ? {
asButtons: true
} : {
asButtons: false,
loop
};
const labelProps = {
'aria-labelledby': ariaLabelledby,
'aria-label': ariaLabelledby ? undefined : ariaLabel || __('Custom color picker')
};
return {
metaProps,
labelProps
};
}
//# sourceMappingURL=utils.js.map