Skip to content

Commit

Permalink
Chore(docs): need to finish documenting core props
Browse files Browse the repository at this point in the history
  • Loading branch information
noahehall committed Jun 6, 2023
1 parent e661536 commit fe532f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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%"}
Expand Down
13 changes: 6 additions & 7 deletions src/IdealImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ export const IdealImage: FC<IdealImageInterface> = ({
theme = {},
threshold,
}) => {
const useIcons = {
...iconMap,
...icons,
};

const useTheme = useMemo(
() => ({
...defaultTheme,
Expand Down Expand Up @@ -323,13 +318,17 @@ export const IdealImage: FC<IdealImageInterface> = ({
getIcon({
imgState,
networkState,
icons: useIcons,
icons: {
...iconMap,
...icons,
},
}),
[useIcons, imgState, networkState]
[icons, imgState, networkState, getIcon]
);

return (
<motion.div
layout
className={className}
onViewportEnter={onEnter}
onViewportLeave={onLeave}
Expand Down

0 comments on commit fe532f4

Please sign in to comment.