Skip to content

Commit

Permalink
Merge pull request #3 from linqiqi077/beta
Browse files Browse the repository at this point in the history
feat: add Breadcrumb component
  • Loading branch information
Carrotzpc authored Jan 15, 2024
2 parents 5cecae5 + e12d1f6 commit 66f99bb
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/Breadcrumb/demos/index.tsx
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>
);
};
16 changes: 16 additions & 0 deletions src/Breadcrumb/index.md
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>
2 changes: 2 additions & 0 deletions src/Breadcrumb/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export type { BreadcrumbProps } from 'antd';
export { Breadcrumb } from 'antd';
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './Breadcrumb';
export * from './ConfigProvider';
export * from './Logo';
export * from './MonacoEditor';
Expand Down

0 comments on commit 66f99bb

Please sign in to comment.