isPresentationRole.js 479 B

1234567891011121314151617
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports["default"] = void 0;
  6. var _jsxAstUtils = require("jsx-ast-utils");
  7. var presentationRoles = new Set(['presentation', 'none']);
  8. var isPresentationRole = function isPresentationRole(tagName, attributes) {
  9. return presentationRoles.has((0, _jsxAstUtils.getLiteralPropValue)((0, _jsxAstUtils.getProp)(attributes, 'role')));
  10. };
  11. var _default = isPresentationRole;
  12. exports["default"] = _default;