-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tabs): refact tabs and add activeKey defaultActiveKey prop (#134)
* feat(tabnav): add defaultActiveKey, activeKey, onTabClick prop affects: @gio-design/components ISSUES CLOSED: #107 * feat(tabs): refact tabs and add activeKey defaultActiveKey prop affects: @gio-design/components, website ISSUES CLOSED: #111
- Loading branch information
Lee Hon
authored
Aug 21, 2020
1 parent
f370141
commit 24ce9e2
Showing
10 changed files
with
2,283 additions
and
5,537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
import { TabPaneProps } from './interface'; | ||
import { TabPane as RcTabPane } from 'rc-tabs'; | ||
|
||
const TabPane = (props: TabPaneProps) => { | ||
const { icon, tab, children, ...rest } = props; | ||
return ( | ||
<RcTabPane tab={icon ? icon : tab} {...rest}> | ||
{children} | ||
</RcTabPane> | ||
); | ||
}; | ||
const TabPane = ({ children, prefixCls, style, className }: TabPaneProps) => ( | ||
<div className={classNames(`${prefixCls}-tabpane`, className)} style={style}> | ||
{children} | ||
</div> | ||
); | ||
|
||
export default TabPane; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.