From b23ec3526077d86ee5f49fc03c40284cf6c2f789 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Fri, 7 Feb 2025 14:41:06 -0800 Subject: [PATCH] add placeholder prop, add min width and height props --- Client/src/Components/Image/index.jsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Client/src/Components/Image/index.jsx b/Client/src/Components/Image/index.jsx index 9304a4385..8f30f8a9e 100644 --- a/Client/src/Components/Image/index.jsx +++ b/Client/src/Components/Image/index.jsx @@ -11,9 +11,12 @@ const Image = ({ alt, width = "auto", height = "auto", + minWidth = "auto", + minHeight = "auto", maxWidth = "auto", maxHeight = "auto", base64, + placeholder, sx, }) => { if (shouldRender === false) { @@ -28,11 +31,21 @@ const Image = ({ src = `data:image/png;base64,${base64}`; } + if ( + typeof src === "undefined" && + typeof base64 === "undefined" && + typeof placeholder !== "undefined" + ) { + src = placeholder; + } + return (