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

Commit

Permalink
experiment with connected renderer from plotly/dash-renderer#26
Browse files Browse the repository at this point in the history
  • Loading branch information
chriddyp committed Oct 17, 2017
1 parent 905346e commit 138d5f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/Tabs.react.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* global window:true */
import R from 'ramda';
import React, {PropTypes} from 'react';

Expand Down Expand Up @@ -42,7 +43,7 @@ function Tab(props) {

return (
<div style={style} onClick={props.onClick} key={props.value}>
{props.label}
{props.render(props.label)}

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


function Tabs(props) {
window.tabsProps = props;
return (
<div>
<div style={R.merge({
Expand All @@ -86,7 +88,8 @@ function Tabs(props) {
onClick: () => props.setProps({value: t.value}),
isSelected: t.value === props.value,
nTabs: props.tabs.length,
vertical: props.vertical
vertical: props.vertical,
render: props.render
}));
})}
</div>
Expand Down

0 comments on commit 138d5f8

Please sign in to comment.