UNPKG

geostyler

Version:
42 lines (41 loc) 915 B
import { jsxs as o, jsx as r } from "react/jsx-runtime"; import { Button as m, Breadcrumb as a } from "antd"; /* empty css */ import { LeftOutlined as c } from "@ant-design/icons"; const b = ({ crumbs: t, onClick: i = () => { } }) => { const s = () => { const e = t[t.length - 2]; i(e.view, e.indices); }; return /* @__PURE__ */ o("div", { className: "gs-breadcrumb", children: [ t.length > 1 && /* @__PURE__ */ r( m, { className: "gs-breadcrumb-prev-button", type: "text", icon: /* @__PURE__ */ r(c, {}), onClick: s } ), /* @__PURE__ */ r( a, { className: "gs-breadcrumb-crumbs", items: t.map((e, n) => ({ key: n, title: e.title, onClick: () => { i(e.view, e.indices); } })) } ) ] }); }; export { b as Breadcrumb };