3

I'm wondering is there a way to set Tabs top and Bottom to display the tabs content using grommet tabs component:

example of what I am looking to do can be seen in the image below.
http://imgur.com/pkWRzUh

I have a sample codepen with a quick mock up.

code can be found in the codepen

http://codepen.io/Niall_Maher/pen/pProXW

4

1 回答 1

1

没有真正的组件可以做到这一点,但是您可以添加第二行带有空内容的选项卡,该选项卡与第一个选项卡同步并向后同步,这要归功于两个选项卡上的以下属性:

activeIndex={this.state.selectedIndex} 
onActive={i=>this.setState({selectedIndex:i})}

签出这个: 在此处输入图像描述

Codepen在这里(:

于 2017-05-03T13:42:13.330 回答