UNPKG

@spark-ui/components

Version:

Spark (Leboncoin design system) components.

58 lines (54 loc) 1.72 kB
import { Slot } from "../chunk-4F5DOL57.mjs"; // src/link-box/LinkBox.tsx import { cx } from "class-variance-authority"; import { jsx } from "react/jsx-runtime"; var LinkBox = ({ className, asChild, ref, ...props }) => { const Component = asChild ? Slot : "div"; return /* @__PURE__ */ jsx( Component, { ref, "data-spark-component": "link-box", className: cx("relative", className), ...props } ); }; LinkBox.displayName = "LinkBox"; // src/link-box/LinkBoxLink.tsx import { cx as cx2 } from "class-variance-authority"; import { jsx as jsx2 } from "react/jsx-runtime"; var LinkBoxLink = ({ className, asChild, ref, ...props }) => { const Component = asChild ? Slot : "a"; return /* @__PURE__ */ jsx2( Component, { ref, "data-spark-component": "link-box-link", className: cx2( "before:z-base static before:absolute before:top-0 before:left-0 before:block before:size-full before:content-['']", className ), ...props } ); }; LinkBoxLink.displayName = "LinkBox.Link"; // src/link-box/LinkBoxRaised.tsx import { cx as cx3 } from "class-variance-authority"; import { jsx as jsx3 } from "react/jsx-runtime"; var LinkBoxRaised = ({ className, ...props }) => { return /* @__PURE__ */ jsx3(Slot, { className: cx3("z-raised relative", className), ...props }); }; LinkBoxRaised.displayName = "LinkBox.Raised"; // src/link-box/index.ts var LinkBox2 = Object.assign(LinkBox, { Link: LinkBoxLink, Raised: LinkBoxRaised }); LinkBox2.displayName = "LinkBox"; LinkBox2.Link.displayName = "LinkBox.Link"; LinkBox2.Raised.displayName = "LinkBox.Raised"; export { LinkBox2 as LinkBox }; //# sourceMappingURL=index.mjs.map