@wordpress/components
Version:
UI components for WordPress.
31 lines (29 loc) • 757 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getComputeCircularOptionPickerCommonProps = getComputeCircularOptionPickerCommonProps;
var _i18n = require("@wordpress/i18n");
/**
* WordPress dependencies
*/
/**
* Computes the common props for the CircularOptionPicker.
*/
function getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby) {
const metaProps = asButtons ? {
asButtons: true
} : {
asButtons: false,
loop
};
const labelProps = {
'aria-labelledby': ariaLabelledby,
'aria-label': ariaLabelledby ? undefined : ariaLabel || (0, _i18n.__)('Custom color picker')
};
return {
metaProps,
labelProps
};
}
//# sourceMappingURL=utils.js.map