@ebay/ebayui-core
Version:
Collection of core eBay components; considered to be the building blocks for all composite structures, pages & apps.
28 lines (27 loc) • 716 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
class Tourtip {
handleCollapse({ originalEvent }) {
if (this.state.expanded) {
this.state.expanded = false;
this.emit("collapse", { originalEvent });
}
}
handleExpand({ originalEvent }) {
if (!this.state.expanded) {
this.state.expanded = true;
this.emit("expand", { originalEvent });
}
}
onInput(input) {
if (input.open === false || input.open === true) {
this.state.expanded = input.open;
}
}
onCreate() {
this.state = {
expanded: true,
};
}
}
module.exports = Tourtip;