@awsui/components-react
Version:
On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en
39 lines • 1.93 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
const dom_1 = require("@awsui/test-utils-core/dom");
const styles_selectors_js_1 = require("../../../internal/components/option/styles.selectors.js");
const styles_selectors_js_2 = require("../../../select/parts/styles.selectors.js");
class OptionWrapper extends dom_1.ComponentWrapper {
findLabel() {
return this.findByClassName(styles_selectors_js_1.default.label);
}
findDescription() {
return this.findByClassName(styles_selectors_js_1.default.description);
}
findLabelTag() {
return this.findByClassName(styles_selectors_js_1.default['label-tag']);
}
findTags() {
return this.findAllByClassName(styles_selectors_js_1.default.tag);
}
findDisabledReason() {
return (0, dom_1.createWrapper)().find(`.${styles_selectors_js_2.default['disabled-reason-tooltip']}`);
}
isDisabled() {
return this.element.classList.contains(styles_selectors_js_1.default.disabled);
}
}
OptionWrapper.rootSelector = styles_selectors_js_1.default.option;
exports.default = OptionWrapper;
__decorate([
dom_1.usesDom
], OptionWrapper.prototype, "isDisabled", null);
//# sourceMappingURL=option.js.map