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 e342e6f
Show file tree
Hide file tree
Showing 2 changed files with 6 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
12 changes: 5 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,9 +318,12 @@ export const IdealImage: FC<IdealImageInterface> = ({
getIcon({
imgState,
networkState,
icons: useIcons,
icons: {
...iconMap,
...icons,
},
}),
[useIcons, imgState, networkState]
[icons, imgState, networkState, getIcon]
);

return (
Expand Down

0 comments on commit e342e6f

Please sign in to comment.