-
Notifications
You must be signed in to change notification settings - Fork 6
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 #3 from linqiqi077/beta
feat: add Breadcrumb component
- Loading branch information
Showing
4 changed files
with
52 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { StoryBook, useControls, useCreateStore } from '@lobehub/ui'; | ||
import type { BreadcrumbProps } from '@yuntijs/ui'; | ||
import { Breadcrumb } from '@yuntijs/ui'; | ||
|
||
const items = [ | ||
{ | ||
title: 'Home', | ||
}, | ||
{ | ||
title: 'Application Center', | ||
}, | ||
{ | ||
title: 'Application List', | ||
}, | ||
{ | ||
title: 'An Application', | ||
}, | ||
]; | ||
|
||
export default () => { | ||
const store = useCreateStore(); | ||
const control: BreadcrumbProps | any = useControls( | ||
{ | ||
separator: '/', | ||
}, | ||
{ store } | ||
); | ||
return ( | ||
<StoryBook levaStore={store}> | ||
<Breadcrumb {...control} items={items} /> | ||
</StoryBook> | ||
); | ||
}; |
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,16 @@ | ||
--- | ||
nav: Components | ||
group: Data Display | ||
title: Breadcrumb | ||
description: A breadcrumb displays the current location within a hierarchy. It allows going back to states higher up in the hierarchy. | ||
--- | ||
|
||
## [Antd Document](https://ant-design.antgroup.com/components/breadcrumb-cn) | ||
|
||
## Default | ||
|
||
<code src="./demos/index.tsx" nopadding></code> | ||
|
||
## APIs | ||
|
||
<API></API> |
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,2 @@ | ||
export type { BreadcrumbProps } from 'antd'; | ||
export { Breadcrumb } from 'antd'; |
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