Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 138d5f8

Browse files
committed
experiment with connected renderer from plotly/dash-renderer#26
1 parent 905346e commit 138d5f8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/Tabs.react.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* global window:true */
12
import R from 'ramda';
23
import React, {PropTypes} from 'react';
34

@@ -42,7 +43,7 @@ function Tab(props) {
4243

4344
return (
4445
<div style={style} onClick={props.onClick} key={props.value}>
45-
{props.label}
46+
{props.render(props.label)}
4647

4748
{props.isSelected && !props.vertical ? <div style={{
4849
'position': 'absolute',
@@ -72,6 +73,7 @@ function Tab(props) {
7273

7374

7475
function Tabs(props) {
76+
window.tabsProps = props;
7577
return (
7678
<div>
7779
<div style={R.merge({
@@ -86,7 +88,8 @@ function Tabs(props) {
8688
onClick: () => props.setProps({value: t.value}),
8789
isSelected: t.value === props.value,
8890
nTabs: props.tabs.length,
89-
vertical: props.vertical
91+
vertical: props.vertical,
92+
render: props.render
9093
}));
9194
})}
9295
</div>

0 commit comments

Comments
 (0)