summaryrefslogtreecommitdiff
path: root/lib/next_image.tsx
diff options
context:
space:
mode:
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 0000000..6fb25bf
--- /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