@theguild/components
Version:
32 lines (31 loc) • 1.01 kB
JavaScript
import { jsxs } from "react/jsx-runtime";
import { cloneElement } from "react";
import { cn } from "../../cn";
import { DecorationIsolation } from "../decorations";
import { GRADIENT_WHITE_2_ID } from "./hero-gradient-ids";
function HeroDecorationFromLogo({ logo, ...rest }) {
return /* @__PURE__ */ jsxs(DecorationIsolation, { ...rest, className: cn("-z-10", rest.className), children: [
cloneElement(logo, {
className: cn("absolute -left-1/2 top-1/2 -translate-y-1/2 stroke-white/10 max-lg:hidden"),
fill: `url(#${GRADIENT_WHITE_2_ID})`,
strokeWidth: "0.1",
height: "50%",
width: "auto",
opacity: 0.8
}),
cloneElement(logo, {
className: cn(
"absolute top-1/2 -translate-y-1/2 stroke-white/10",
"-right-1/2 lg:-right-1/3",
"h-2/3 lg:h-[calc(100%-5%)]"
),
fill: `url(#${GRADIENT_WHITE_2_ID})`,
strokeWidth: "0.1",
width: "auto",
opacity: 0.6
})
] });
}
export {
HeroDecorationFromLogo
};