UNPKG

@loke/ui

Version:
28 lines (26 loc) • 740 B
"use client"; // src/components/arrow/arrow.tsx import { Primitive } from "@loke/ui/primitive"; import { forwardRef } from "react"; import { jsx } from "react/jsx-runtime"; var NAME = "Arrow", Arrow = /* @__PURE__ */ Object.assign(/* @__PURE__ */ forwardRef((props, forwardedRef) => { let { children, width = 10, height = 5, ...arrowProps } = props; return /* @__PURE__ */ jsx(Primitive.svg, { ...arrowProps, "aria-hidden": "true", height, preserveAspectRatio: "none", ref: forwardedRef, viewBox: "0 0 30 10", width, children: props.asChild ? children : /* @__PURE__ */ jsx("polygon", { points: "0,0 30,0 15,10" }) }); }), { displayName: NAME }), Root = Arrow; export { Arrow, Root };