@medialane/ui 0.1.5 → 0.1.6
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,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
"use client";
|
|
3
2
|
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -35,15 +34,7 @@ module.exports = __toCommonJS(brand_icon_exports);
|
|
|
35
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
35
|
var import_image = __toESM(require("next/image"), 1);
|
|
37
36
|
var import_link = __toESM(require("next/link"), 1);
|
|
38
|
-
var import_react = require("react");
|
|
39
37
|
function MedialaneIcon({ size = 256, href = "/", className }) {
|
|
40
|
-
const [mounted, setMounted] = (0, import_react.useState)(false);
|
|
41
|
-
(0, import_react.useEffect)(() => {
|
|
42
|
-
setMounted(true);
|
|
43
|
-
}, []);
|
|
44
|
-
if (!mounted) {
|
|
45
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href, className, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { width: size, height: size } }) });
|
|
46
|
-
}
|
|
47
38
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
39
|
import_link.default,
|
|
49
40
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/brand-icon.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/components/brand-icon.tsx"],"sourcesContent":["import Image from \"next/image\";\nimport Link from \"next/link\";\n\nexport interface MedialaneIconProps {\n size?: number;\n href?: string;\n className?: string;\n}\n\nexport function MedialaneIcon({ size = 256, href = \"/\", className }: MedialaneIconProps) {\n return (\n <Link\n href={href}\n className={`transition-opacity hover:opacity-80 drop-shadow-md ${className ?? \"\"}`}\n >\n <Image\n src=\"/icon.png\"\n alt=\"Medialane\"\n width={size}\n height={size}\n priority\n />\n </Link>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAeM;AAfN,mBAAkB;AAClB,kBAAiB;AAQV,SAAS,cAAc,EAAE,OAAO,KAAK,OAAO,KAAK,UAAU,GAAuB;AACvF,SACE;AAAA,IAAC,YAAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW,sDAAsD,aAAa,EAAE;AAAA,MAEhF;AAAA,QAAC,aAAAC;AAAA,QAAA;AAAA,UACC,KAAI;AAAA,UACJ,KAAI;AAAA,UACJ,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,UAAQ;AAAA;AAAA,MACV;AAAA;AAAA,EACF;AAEJ;","names":["Link","Image"]}
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import Image from "next/image";
|
|
4
3
|
import Link from "next/link";
|
|
5
|
-
import { useEffect, useState } from "react";
|
|
6
4
|
function MedialaneIcon({ size = 256, href = "/", className }) {
|
|
7
|
-
const [mounted, setMounted] = useState(false);
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
setMounted(true);
|
|
10
|
-
}, []);
|
|
11
|
-
if (!mounted) {
|
|
12
|
-
return /* @__PURE__ */ jsx(Link, { href, className, children: /* @__PURE__ */ jsx("div", { style: { width: size, height: size } }) });
|
|
13
|
-
}
|
|
14
5
|
return /* @__PURE__ */ jsx(
|
|
15
6
|
Link,
|
|
16
7
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/brand-icon.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/components/brand-icon.tsx"],"sourcesContent":["import Image from \"next/image\";\nimport Link from \"next/link\";\n\nexport interface MedialaneIconProps {\n size?: number;\n href?: string;\n className?: string;\n}\n\nexport function MedialaneIcon({ size = 256, href = \"/\", className }: MedialaneIconProps) {\n return (\n <Link\n href={href}\n className={`transition-opacity hover:opacity-80 drop-shadow-md ${className ?? \"\"}`}\n >\n <Image\n src=\"/icon.png\"\n alt=\"Medialane\"\n width={size}\n height={size}\n priority\n />\n </Link>\n );\n}\n"],"mappings":"AAeM;AAfN,OAAO,WAAW;AAClB,OAAO,UAAU;AAQV,SAAS,cAAc,EAAE,OAAO,KAAK,OAAO,KAAK,UAAU,GAAuB;AACvF,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,sDAAsD,aAAa,EAAE;AAAA,MAEhF;AAAA,QAAC;AAAA;AAAA,UACC,KAAI;AAAA,UACJ,KAAI;AAAA,UACJ,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,UAAQ;AAAA;AAAA,MACV;AAAA;AAAA,EACF;AAEJ;","names":[]}
|