summaryrefslogtreecommitdiff
path: root/lib/next_image.tsx
diff options
context:
space:
mode:
authorMichal Sapka <michal@sapka.me>2022-09-10 23:55:02 +0200
committerMichal Sapka <michal@sapka.me>2022-09-10 23:55:02 +0200
commit0d30b9573ba35ad24d78b92743ad0dda8a19b7af (patch)
treedfdbdd0bebada93b68b622849d11848c00fce303 /lib/next_image.tsx
parentbd653ee25cb30be6c367582be14bd967494c03c0 (diff)
feat: resize logo
Diffstat (limited to 'lib/next_image.tsx')
-rw-r--r--lib/next_image.tsx19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/next_image.tsx b/lib/next_image.tsx
new file mode 100644
index 00000000..6fb25bfd
--- /dev/null
+++ b/lib/next_image.tsx
@@ -0,0 +1,19 @@
+import NextImage from "next/image";
+import { chakra } from "@chakra-ui/react";
+
+const Image = chakra(NextImage, {
+ baseStyle: { maxH: 120, maxW: 120 },
+ shouldForwardProp: (prop) =>
+ [
+ "width",
+ "height",
+ "src",
+ "alt",
+ "quality",
+ "placeholder",
+ "blurDataURL",
+ "loader ",
+ ].includes(prop),
+});
+
+export default Image