source: frontend/node_modules/eslint-plugin-jsx-a11y/lib/util/implicitRoles/menu.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago

Fix frontend appearance

  • Property mode set to 100644
File size: 528 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports["default"] = getImplicitRoleForMenu;
7var _jsxAstUtils = require("jsx-ast-utils");
8/**
9 * Returns the implicit role for a menu tag.
10 */
11function getImplicitRoleForMenu(attributes) {
12 var type = (0, _jsxAstUtils.getProp)(attributes, 'type');
13 if (type) {
14 var value = (0, _jsxAstUtils.getLiteralPropValue)(type);
15 return value && value.toUpperCase() === 'TOOLBAR' ? 'toolbar' : '';
16 }
17 return '';
18}
19module.exports = exports.default;
Note: See TracBrowser for help on using the repository browser.