From b4f36b6be057c41b2021af87b461ba5352fecc38 Mon Sep 17 00:00:00 2001 From: Ramin Erfani Date: Tue, 13 Aug 2019 09:40:02 +0200 Subject: [PATCH] Add className to both Tab and TabButton instead of TabButton only --- src/view/Tab.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/view/Tab.tsx b/src/view/Tab.tsx index 91c15487..6ebb0049 100755 --- a/src/view/Tab.tsx +++ b/src/view/Tab.tsx @@ -49,7 +49,13 @@ export class Tab extends React.Component { render() { const cm = this.props.layout.getClassName; + let classNames = cm("flexlayout__tab"); const node = this.props.node; + + if (this.props.node.getClassName() !== undefined) { + classNames += " " + this.props.node.getClassName(); + } + const parentNode = node.getParent() as TabSetNode; const style: JSMap = node._styleWithPosition({ display: this.props.selected ? "block" : "none" @@ -64,7 +70,7 @@ export class Tab extends React.Component { child = this.props.factory(node); } - return
{child}