From 9fd514637c084f0c0b789d56116078571fa703c4 Mon Sep 17 00:00:00 2001 From: Thomas Brouard Date: Tue, 1 Nov 2016 11:13:00 +0100 Subject: [PATCH] Add hide/show methods --- index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.js b/index.js index fe3374f..df05087 100644 --- a/index.js +++ b/index.js @@ -203,6 +203,16 @@ class Tab extends EventEmitter { this.emit("active", this); } + show () { + if (this.isClosed) return; + this.tab.classList.add("visible"); + } + + hide () { + if (this.isClosed) return; + this.tab.classList.remove("visible"); + } + flash (flag) { if (this.isClosed) return; if (flag !== false) {