From fe532f4b7c37c0a649ad97c2317035fc9dc0380d Mon Sep 17 00:00:00 2001 From: poop Date: Mon, 5 Jun 2023 19:30:47 -0500 Subject: [PATCH] Chore(docs): need to finish documenting core props --- README.md | 2 +- src/IdealImage.tsx | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index dd70b6e..2130a15 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ const App = () => ( /* see framer-motion docs */ /* motionProps={} */ alt="ideal image" - // you should also add specific width & height set to numbers + // you could include specific width & height set to numbers srcSet={[{ src: "some/image.webp" }]} // prefer passing width && height set to numbers width={"100%"} diff --git a/src/IdealImage.tsx b/src/IdealImage.tsx index 0bb3f17..c0271df 100644 --- a/src/IdealImage.tsx +++ b/src/IdealImage.tsx @@ -56,11 +56,6 @@ export const IdealImage: FC = ({ theme = {}, threshold, }) => { - const useIcons = { - ...iconMap, - ...icons, - }; - const useTheme = useMemo( () => ({ ...defaultTheme, @@ -323,13 +318,17 @@ export const IdealImage: FC = ({ getIcon({ imgState, networkState, - icons: useIcons, + icons: { + ...iconMap, + ...icons, + }, }), - [useIcons, imgState, networkState] + [icons, imgState, networkState, getIcon] ); return (