@theguild/components 9.2.1-alpha-20250122154428-0f46da0bab772b4d58b324087399866cb0821a48 → 9.3.0-alpha-20250122154323-ee0b61f5fe0da0adf9f686e3bf67c7532e1aa794
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactElement, ReactNode, FC } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface HeroProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
heading: string;
|
|
6
6
|
text: string;
|
|
7
7
|
checkmarks: string[];
|
|
8
|
-
|
|
8
|
+
top?: {
|
|
9
|
+
logo: ReactElement<{
|
|
10
|
+
className?: string;
|
|
11
|
+
fill?: string;
|
|
12
|
+
}>;
|
|
13
|
+
} | {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
};
|
|
9
16
|
children?: ReactNode;
|
|
10
|
-
}
|
|
17
|
+
}
|
|
18
|
+
declare const Hero: FC<HeroProps>;
|
|
11
19
|
|
|
12
|
-
export { Hero };
|
|
20
|
+
export { Hero, type HeroProps };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cloneElement, useId } from "react";
|
|
3
3
|
import { cn } from "../../cn";
|
|
4
|
-
import { DecorationIsolation } from "../decorations";
|
|
5
4
|
import { Heading } from "../heading";
|
|
6
5
|
import { CheckIcon } from "../icons";
|
|
7
6
|
const Hero = (props) => {
|
|
@@ -16,32 +15,13 @@ const Hero = (props) => {
|
|
|
16
15
|
props.className
|
|
17
16
|
),
|
|
18
17
|
children: [
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
cloneElement(props.logo, {
|
|
21
|
-
className: cn(
|
|
22
|
-
"absolute stroke-white/10 max-lg:hidden",
|
|
23
|
-
"-left-1/2 top-1/2 -translate-y-1/2"
|
|
24
|
-
),
|
|
25
|
-
fill: `url(#${gradientWhiteId2})`,
|
|
26
|
-
strokeWidth: "0.1",
|
|
27
|
-
width: "auto",
|
|
28
|
-
height: "50%"
|
|
29
|
-
}),
|
|
30
|
-
cloneElement(props.logo, {
|
|
31
|
-
className: cn(
|
|
32
|
-
"absolute top-1/2 -translate-y-1/2 stroke-white/10",
|
|
33
|
-
"-right-1/2 lg:-right-1/3",
|
|
34
|
-
"h-2/3 lg:h-[calc(100%-5%)]"
|
|
35
|
-
),
|
|
36
|
-
fill: `url(#${gradientWhiteId2})`,
|
|
37
|
-
strokeWidth: "0.1",
|
|
38
|
-
width: "auto"
|
|
39
|
-
})
|
|
40
|
-
] }),
|
|
41
|
-
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
42
|
-
cloneElement(props.logo, {
|
|
18
|
+
/* @__PURE__ */ jsx("div", { className: "relative", children: props.top && ("logo" in props.top ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19
|
+
cloneElement(props.top.logo, {
|
|
43
20
|
fill: `url(#${gradientWhiteId})`,
|
|
44
|
-
className:
|
|
21
|
+
className: cn(
|
|
22
|
+
"absolute inset-1/2 size-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
23
|
+
props.top.logo.props.className
|
|
24
|
+
)
|
|
45
25
|
}),
|
|
46
26
|
/* @__PURE__ */ jsxs(
|
|
47
27
|
"svg",
|
|
@@ -115,7 +95,7 @@ const Hero = (props) => {
|
|
|
115
95
|
]
|
|
116
96
|
}
|
|
117
97
|
)
|
|
118
|
-
] }),
|
|
98
|
+
] }) : props.top.children) }),
|
|
119
99
|
/* @__PURE__ */ jsx(Heading, { as: "h1", size: "xl", className: "mx-auto max-w-3xl text-balance text-center", children: props.heading }),
|
|
120
100
|
/* @__PURE__ */ jsx("p", { className: "mx-auto w-[512px] max-w-[80%] text-center leading-6 text-green-800", children: props.text }),
|
|
121
101
|
/* @__PURE__ */ jsx("ul", { className: "mx-auto flex list-none gap-x-6 gap-y-2 text-sm font-medium max-md:flex-col", children: props.checkmarks.map((text) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2", children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theguild/components",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0-alpha-20250122154323-ee0b61f5fe0da0adf9f686e3bf67c7532e1aa794",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://github.com/the-guild-org/docs",
|
|
6
6
|
"directory": "packages/components"
|