@lobehub/ui
Version:
Lobe UI is an open-source UI component library for building AIGC web apps
30 lines (29 loc) • 980 B
JavaScript
"use client";
import { styles } from "./style.mjs";
import { memo } from "react";
import { jsx } from "react/jsx-runtime";
import { cx } from "antd-style";
import { Separator } from "@base-ui/react/separator";
//#region src/base-ui/Divider/Divider.tsx
const Divider = memo(({ children, className, dashed = false, orientation = "horizontal", ref, ...rest }) => {
if (children != null && orientation === "horizontal") return /* @__PURE__ */ jsx(Separator, {
className: cx(styles.withText, dashed && styles.dashed, className),
orientation: "horizontal",
ref,
...rest,
children: /* @__PURE__ */ jsx("span", {
className: styles.text,
children
})
});
return /* @__PURE__ */ jsx(Separator, {
orientation,
ref,
className: cx(orientation === "vertical" ? styles.vertical : styles.horizontal, dashed && styles.dashed, className),
...rest
});
});
Divider.displayName = "Divider";
//#endregion
export { Divider as default };
//# sourceMappingURL=Divider.mjs.map