@theguild/components 8.0.0-alpha-20241128125739-2f2680e350f7112a00bb3a33aa3811950d0152fb → 8.0.0-alpha-20241128140624-8c99173571d9eb7d61c573a6569430ca28ae2111
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.
|
@@ -4,7 +4,9 @@ import { useState } from "react";
|
|
|
4
4
|
import { cn } from "../cn";
|
|
5
5
|
import { CallToAction } from "./call-to-action";
|
|
6
6
|
function CookiesConsent(props) {
|
|
7
|
-
const [consented, setConsented] = useState(() =>
|
|
7
|
+
const [consented, setConsented] = useState(() => {
|
|
8
|
+
return typeof localStorage === "undefined" ? false : localStorage.getItem("cookies") === "true";
|
|
9
|
+
});
|
|
8
10
|
const onAccept = () => {
|
|
9
11
|
setConsented(true);
|
|
10
12
|
if (typeof localStorage !== "undefined") {
|
|
@@ -5,8 +5,8 @@ import 'react';
|
|
|
5
5
|
declare function ToolsAndLibrariesCards({ className }: {
|
|
6
6
|
className?: string;
|
|
7
7
|
}): react_jsx_runtime.JSX.Element;
|
|
8
|
-
declare function MainProductCard({ as: Root, product, ...rest }: ProductCardProps): react_jsx_runtime.JSX.Element;
|
|
9
|
-
declare function AncillaryProductCard({ product, as: Root, ...rest }: ProductCardProps): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function MainProductCard({ as: Root, product, className, ...rest }: ProductCardProps): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function AncillaryProductCard({ product, as: Root, className, ...rest }: ProductCardProps): react_jsx_runtime.JSX.Element;
|
|
10
10
|
interface ProductCardProps extends React.HTMLAttributes<HTMLElement> {
|
|
11
11
|
as: 'div' | 'li';
|
|
12
12
|
product: ProductInfo;
|
|
@@ -38,7 +38,7 @@ function ToolsAndLibrariesCards({ className }) {
|
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
function MainProductCard({ as: Root, product, ...rest }) {
|
|
41
|
+
function MainProductCard({ as: Root, product, className, ...rest }) {
|
|
42
42
|
const Decoration = cardDecorations[product.name];
|
|
43
43
|
const Icon = product.logo;
|
|
44
44
|
const isHive = product.name === PRODUCTS.HIVE.name;
|
|
@@ -47,7 +47,8 @@ function MainProductCard({ as: Root, product, ...rest }) {
|
|
|
47
47
|
{
|
|
48
48
|
className: cn(
|
|
49
49
|
"hive-focus-within group relative flex-1 shrink-0 basis-[283.5px] overflow-hidden rounded-2xl bg-blue-400 text-green-1000 max-md:w-[283.5px]",
|
|
50
|
-
isHive && "bg-green-1000 text-white"
|
|
50
|
+
isHive && "bg-green-1000 text-white",
|
|
51
|
+
className
|
|
51
52
|
),
|
|
52
53
|
...rest,
|
|
53
54
|
children: [
|
|
@@ -80,12 +81,15 @@ function MainProductCard({ as: Root, product, ...rest }) {
|
|
|
80
81
|
product.name
|
|
81
82
|
);
|
|
82
83
|
}
|
|
83
|
-
function AncillaryProductCard({ product, as: Root, ...rest }) {
|
|
84
|
+
function AncillaryProductCard({ product, as: Root, className, ...rest }) {
|
|
84
85
|
const Logo = product.logo;
|
|
85
86
|
return /* @__PURE__ */ jsx(
|
|
86
87
|
Root,
|
|
87
88
|
{
|
|
88
|
-
className:
|
|
89
|
+
className: cn(
|
|
90
|
+
"hive-focus-within shrink-0 basis-[283.5px] rounded-2xl bg-beige-200 text-green-1000 transition-colors duration-500 hover:bg-beige-400 max-sm:min-w-[283.5px]",
|
|
91
|
+
className
|
|
92
|
+
),
|
|
89
93
|
...rest,
|
|
90
94
|
children: /* @__PURE__ */ jsxs(
|
|
91
95
|
"a",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theguild/components",
|
|
3
|
-
"version": "8.0.0-alpha-
|
|
3
|
+
"version": "8.0.0-alpha-20241128140624-8c99173571d9eb7d61c573a6569430ca28ae2111",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "https://github.com/the-guild-org/docs",
|
|
6
6
|
"directory": "packages/components"
|