mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
- add the breadcrumb family: root, list, item, link, page, separator, ellipsis - build from a path with a per-call label provider, append_item/append, or explicit data-path items - collapse overflowing items while keeping as many trailing nodes as fit; the ellipsis opens a Portal-based dropdown - emit change with the clicked node key; pages, disabled items, and custom append content never emit - add theme rules, integration tests, a preview scene, and zh-CN docs with C/XML/TSX demos
31 lines
802 B
TypeScript
31 lines
802 B
TypeScript
import {
|
|
Breadcrumb,
|
|
BreadcrumbItem,
|
|
BreadcrumbLink,
|
|
BreadcrumbList,
|
|
BreadcrumbSeparator,
|
|
Button,
|
|
} from "@lcui/react";
|
|
|
|
export default function Example() {
|
|
return (
|
|
<Breadcrumb className="breadcrumb-custom-demo">
|
|
<BreadcrumbList>
|
|
<BreadcrumbItem data-path="/home">
|
|
<BreadcrumbLink>Home</BreadcrumbLink>
|
|
<BreadcrumbSeparator />
|
|
</BreadcrumbItem>
|
|
<BreadcrumbItem data-path="/home/components">
|
|
<BreadcrumbLink>Components</BreadcrumbLink>
|
|
<BreadcrumbSeparator />
|
|
</BreadcrumbItem>
|
|
<BreadcrumbItem data-key="settings" data-label="Settings">
|
|
<Button variant="ghost" size="sm">
|
|
Settings
|
|
</Button>
|
|
</BreadcrumbItem>
|
|
</BreadcrumbList>
|
|
</Breadcrumb>
|
|
);
|
|
}
|