ant-design/components/tabs/index.jsx

25 lines
454 B
React
Raw Normal View History

2015-06-12 12:01:02 +08:00
'use strict';
2015-06-15 19:56:58 +08:00
var Tabs = require('rc-tabs');
2015-06-12 12:01:02 +08:00
var React = require('react');
2015-06-19 17:26:24 +08:00
var prefixCls = 'ant-tabs';
2015-06-12 12:01:02 +08:00
class AntTabs extends React.Component {
render() {
2015-06-19 17:26:24 +08:00
var sizeCls = '';
if (this.props.size === 'mini') {
sizeCls = prefixCls + '-mini';
}
return <Tabs {...this.props} className={sizeCls} />;
2015-06-12 12:01:02 +08:00
}
}
AntTabs.defaultProps = {
2015-06-19 17:26:24 +08:00
prefixCls: prefixCls,
size: 'normal'
2015-06-12 12:01:02 +08:00
};
2015-06-15 19:56:58 +08:00
AntTabs.TabPane = Tabs.TabPane;
2015-06-12 12:01:02 +08:00
module.exports = AntTabs;