-
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.
chore: Merge master branch and fix conflicts
- Loading branch information
Showing
23 changed files
with
17,055 additions
and
6,667 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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React from 'react'; | ||
import { Breadcrumb } from '@oceanbase/design'; | ||
|
||
const App: React.FC = () => ( | ||
<Breadcrumb | ||
items={[ | ||
{ | ||
href: '', | ||
title: 'User', | ||
}, | ||
{ | ||
href: '', | ||
title: 'User List', | ||
}, | ||
{ | ||
title: 'User Detail', | ||
}, | ||
]} | ||
/> | ||
); | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
import { Breadcrumb } from '@oceanbase/design'; | ||
import { UserOutlined } from '@oceanbase/icons'; | ||
|
||
const App: React.FC = () => ( | ||
<Breadcrumb | ||
items={[ | ||
{ | ||
href: '', | ||
title: ( | ||
<> | ||
<UserOutlined /> | ||
<span>User</span> | ||
</> | ||
), | ||
}, | ||
{ | ||
href: '', | ||
title: 'User List', | ||
}, | ||
{ | ||
title: 'User Detail', | ||
}, | ||
]} | ||
/> | ||
); | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React, { useState } from 'react'; | ||
import { Breadcrumb } from '@oceanbase/design'; | ||
|
||
const App: React.FC = () => { | ||
const [selectedKey, setSelectedKey] = useState('1'); | ||
const menuItems = [ | ||
{ | ||
key: '1', | ||
label: 'Jackson', | ||
}, | ||
{ | ||
key: '2', | ||
label: 'John', | ||
}, | ||
{ | ||
key: '3', | ||
label: 'Lucy', | ||
}, | ||
]; | ||
return ( | ||
<Breadcrumb | ||
items={[ | ||
{ | ||
href: '', | ||
title: 'User', | ||
}, | ||
{ | ||
title: 'User List', | ||
}, | ||
{ | ||
title: menuItems.find(item => item.key === selectedKey).label, | ||
menu: { | ||
items: menuItems, | ||
selectedKeys: [selectedKey], | ||
onClick: ({ key }) => { | ||
setSelectedKey(key); | ||
}, | ||
}, | ||
}, | ||
]} | ||
/> | ||
); | ||
}; | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: Breadcrumb 面包屑 | ||
nav: | ||
title: 基础组件 | ||
path: /components | ||
demo: | ||
cols: 2 | ||
--- | ||
|
||
- 🔥 完全继承 antd [Breadcrumb](https://ant.design/components/breadcrumb-cn) 的能力和 API,可无缝切换。 | ||
- 💄 定制主题和样式,符合 OceanBase Design 设计规范。 | ||
|
||
## 代码演示 | ||
|
||
<!-- prettier-ignore --> | ||
<code src="./demo/basic.tsx" title="基本"></code> | ||
<code src="./demo/icon.tsx" title="带图标"></code> | ||
<code src="./demo/menu.tsx" title="带下拉菜单"></code> | ||
|
||
## API | ||
|
||
- 详见 antd Breadcrumb 文档: https://ant.design/components/breadcrumb-cn |
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
Oops, something went wrong.