|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
877 bytes
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
|---|
| 4 | value: true
|
|---|
| 5 | });
|
|---|
| 6 | exports["default"] = void 0;
|
|---|
| 7 | var _jsxAstUtils = require("jsx-ast-utils");
|
|---|
| 8 | var isDisabledElement = function isDisabledElement(attributes) {
|
|---|
| 9 | var disabledAttr = (0, _jsxAstUtils.getProp)(attributes, 'disabled');
|
|---|
| 10 | var disabledAttrValue = (0, _jsxAstUtils.getPropValue)(disabledAttr);
|
|---|
| 11 | var isHTML5Disabled = disabledAttr && disabledAttrValue !== undefined;
|
|---|
| 12 | if (isHTML5Disabled) {
|
|---|
| 13 | return true;
|
|---|
| 14 | }
|
|---|
| 15 | var ariaDisabledAttr = (0, _jsxAstUtils.getProp)(attributes, 'aria-disabled');
|
|---|
| 16 | var ariaDisabledAttrValue = (0, _jsxAstUtils.getLiteralPropValue)(ariaDisabledAttr);
|
|---|
| 17 | if (ariaDisabledAttr && ariaDisabledAttrValue !== undefined && ariaDisabledAttrValue === true) {
|
|---|
| 18 | return true;
|
|---|
| 19 | }
|
|---|
| 20 | return false;
|
|---|
| 21 | };
|
|---|
| 22 | var _default = exports["default"] = isDisabledElement;
|
|---|
| 23 | module.exports = exports.default; |
|---|
Note:
See
TracBrowser
for help on using the repository browser.