-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #659 from oceanbase/dengfuping-dev
[Feature Branch] feat(design): Tabs items and TabPane add divider prop
- Loading branch information
Showing
8 changed files
with
105 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import type { TabsProps } from '@oceanbase/design'; | ||
import { Space, Tabs } from '@oceanbase/design'; | ||
import React from 'react'; | ||
|
||
const onChange = (key: string) => { | ||
console.log(key); | ||
}; | ||
|
||
const items: TabsProps['items'] = [ | ||
{ | ||
key: '1', | ||
label: `Tab 1`, | ||
children: `Content of Tab Pane 1`, | ||
}, | ||
{ | ||
divider: true, | ||
}, | ||
{ | ||
key: '2', | ||
label: `Tab 2`, | ||
children: `Content of Tab Pane 2`, | ||
}, | ||
{ | ||
divider: true, | ||
}, | ||
{ | ||
key: '3', | ||
label: `Tab 3`, | ||
children: `Content of Tab Pane 3`, | ||
}, | ||
]; | ||
|
||
const App: React.FC = () => ( | ||
<Space direction="vertical" size={32}> | ||
<Tabs defaultActiveKey="1" items={items} onChange={onChange} /> | ||
<Tabs defaultActiveKey="1" items={items} tabPosition="left" onChange={onChange} /> | ||
</Space> | ||
); | ||
|
||
export default App; |
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
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