From e12d1f613ec2bcd4d84b8376b79d6aca55e3da5c Mon Sep 17 00:00:00 2001 From: linqiqi077 <865530219@qq.com> Date: Mon, 15 Jan 2024 09:26:10 +0800 Subject: [PATCH] feat: add Breadcrumb component --- src/Breadcrumb/demos/index.tsx | 33 +++++++++++++++++++++++++++++++++ src/Breadcrumb/index.md | 16 ++++++++++++++++ src/Breadcrumb/index.tsx | 2 ++ src/index.ts | 1 + 4 files changed, 52 insertions(+) create mode 100644 src/Breadcrumb/demos/index.tsx create mode 100644 src/Breadcrumb/index.md create mode 100644 src/Breadcrumb/index.tsx diff --git a/src/Breadcrumb/demos/index.tsx b/src/Breadcrumb/demos/index.tsx new file mode 100644 index 0000000..87531ed --- /dev/null +++ b/src/Breadcrumb/demos/index.tsx @@ -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 ( + + + + ); +}; diff --git a/src/Breadcrumb/index.md b/src/Breadcrumb/index.md new file mode 100644 index 0000000..44a6698 --- /dev/null +++ b/src/Breadcrumb/index.md @@ -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 + + + +## APIs + + diff --git a/src/Breadcrumb/index.tsx b/src/Breadcrumb/index.tsx new file mode 100644 index 0000000..672c926 --- /dev/null +++ b/src/Breadcrumb/index.tsx @@ -0,0 +1,2 @@ +export type { BreadcrumbProps } from 'antd'; +export { Breadcrumb } from 'antd'; diff --git a/src/index.ts b/src/index.ts index f372a4c..357e77f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,4 @@ +export * from './Breadcrumb'; export * from './ConfigProvider'; export * from './Logo'; export * from './MonacoEditor';