@razorpay/blade
Version:
The Design System that powers Razorpay
29 lines (25 loc) • 859 B
JavaScript
import { accessibilityMap } from './accessibilityMapWeb.js';
import '../logger/index.js';
import { logger } from '../logger/logger.js';
/* eslint-disable @typescript-eslint/no-explicit-any */
var makeAccessible = function makeAccessible(props) {
var newProps = {};
// eslint-disable-next-line guard-for-in
for (var key in props) {
var propKey = key;
var propValue = props[propKey];
var accessibilityAttribute = accessibilityMap[propKey];
if (accessibilityAttribute) {
newProps[accessibilityAttribute] = propValue;
} else if (false) {
logger({
message: "No mapping found for ".concat(propKey, ". Make sure you have entered valid key"),
moduleName: 'makeAccessible',
type: 'warn'
});
}
}
return newProps;
};
export { makeAccessible };
//# sourceMappingURL=makeAccessible.web.js.map