Skip to content

Commit

Permalink
Add tabPostion bottom
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Dec 16, 2015
1 parent f056e51 commit 7eb3c04
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 41 deletions.
45 changes: 45 additions & 0 deletions components/tabs/demo/position.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 位置

- order: 6

有四个位置,`tabPosition="left|right|top|bottom"`

---

````jsx
import { Tabs, Select } from 'antd';
const TabPane = Tabs.TabPane;
const Option = Select.Option;

const Demo = React.createClass({
getInitialState() {
return {
tabPosition: 'top',
};
},
changeTabPosition(tabPosition) {
this.setState({ tabPosition });
},
render() {
return <div>
<div style={{marginBottom: 16}}>
页签位置:
<Select value={this.state.tabPosition} onChange={this.changeTabPosition}
dropdownMatchSelectWidth={false}>
<Option value="top">top</Option>
<Option value="bottom">bottom</Option>
<Option value="left">left</Option>
<Option value="right">right</Option>
</Select>
</div>
<Tabs tabPosition={this.state.tabPosition}>
<TabPane tab="选项卡一" key="1">选项卡一内容</TabPane>
<TabPane tab="选项卡二" key="2">选项卡二内容</TabPane>
<TabPane tab="选项卡三" key="3">选项卡三内容</TabPane>
</Tabs>
</div>;
}
});

ReactDOM.render(<Demo />, document.getElementById('components-tabs-demo-position'));
````
21 changes: 0 additions & 21 deletions components/tabs/demo/vertical-left.md

This file was deleted.

20 changes: 0 additions & 20 deletions components/tabs/demo/vertical-right.md

This file was deleted.

5 changes: 5 additions & 0 deletions style/components/tabs.less
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,11 @@
}
}

&-bottom &-tabs-bar {
margin-bottom: 0;
margin-top: 16px;
}


// card style
&&-card &-ink-bar {
Expand Down

0 comments on commit 7eb3c04

Please sign in to comment.