Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

25 řádky
800 B

  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _jsxAstUtils = require('jsx-ast-utils');
  6. var isDisabledElement = function isDisabledElement(attributes) {
  7. var disabledAttr = (0, _jsxAstUtils.getProp)(attributes, 'disabled');
  8. var disabledAttrValue = (0, _jsxAstUtils.getPropValue)(disabledAttr);
  9. var isHTML5Disabled = disabledAttr && disabledAttrValue !== undefined;
  10. if (isHTML5Disabled) {
  11. return true;
  12. }
  13. var ariaDisabledAttr = (0, _jsxAstUtils.getProp)(attributes, 'aria-disabled');
  14. var ariaDisabledAttrValue = (0, _jsxAstUtils.getLiteralPropValue)(ariaDisabledAttr);
  15. if (ariaDisabledAttr && ariaDisabledAttrValue !== undefined && ariaDisabledAttrValue === true) {
  16. return true;
  17. }
  18. return false;
  19. };
  20. exports.default = isDisabledElement;