@wix/design-system
Version:
@wix/design-system
16 lines (15 loc) • 505 B
JavaScript
;
exports.__esModule = true;
exports.transformAriaKebabCase = transformAriaKebabCase;
function transformAriaKebabCase(props) {
var ariaAttributes = {};
Object.entries(props).forEach(_ref => {
var [key, value] = _ref;
if (typeof key === 'string' && key.startsWith('aria')) {
var transformedKey = "aria-".concat(key.slice(4).toLowerCase());
ariaAttributes[transformedKey] = value;
}
});
return ariaAttributes;
}
//# sourceMappingURL=transformAriaKebabCase.js.map