UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

19 lines 613 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAriaDescriptorsBy = void 0; // build descriptive id for aria-describedby or aria-labelledby const getAriaDescriptorsBy = ({ title, content, titleId, contentId, }) => { const descriptorsId = []; if (title) { descriptorsId.push(titleId); } if (content) { descriptorsId.push(contentId); } if (descriptorsId.length === 0) { return undefined; } return descriptorsId.join(' '); }; exports.getAriaDescriptorsBy = getAriaDescriptorsBy; //# sourceMappingURL=tooltip.utils.js.map