diff --git a/src/Image/index.js b/src/Image/index.js index dedf629..4491bf2 100644 --- a/src/Image/index.js +++ b/src/Image/index.js @@ -1,6 +1,12 @@ import PropTypes from "@znck/prop-types"; import hypenateStyleName from "hyphenate-style-name"; +const isSsr = typeof window === "undefined"; + +const universalBtoa = isSsr + ? (str) => Buffer.from(str.toString(), "binary").toString("base64") + : window.btoa; + const absolutePositioning = { position: "absolute", left: "0px", @@ -169,26 +175,30 @@ export const Image = { const { width, aspectRatio } = data; const height = data.height || width / aspectRatio; + const transition = fadeInDuration + ? `opacity ${fadeInDuration}ms ${fadeInDuration}ms` + : null; + + const svg = ``; return (