Skip to content

Commit

Permalink
Chore(css): ensure each component receives appropriate classes & styles
Browse files Browse the repository at this point in the history
  • Loading branch information
noahehall committed Jun 4, 2023
1 parent aab28a6 commit e661536
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,25 @@
- framer-motion replaces react-waypoint

```sh
bun add github:noahehall/react-idealer-image
bun add \
github:noahehall/react-idealer-image \
framer-motion \
react \
react-dom
```

```ts
import { IdealImage } from "react-idealer-image";

const App = () => (
/** check the component source for the full api */
<IdealImage
motionProps={} /* see framer-motion docs */
/* see framer-motion docs */
/* motionProps={} */
alt="ideal image"
// you should also add specific width & height set to numbers
srcSet={[{ src: "some/image.webp" }]}
// prefer passing width && height set to numbers
width={"100%"}
/>
);
Expand Down
2 changes: 1 addition & 1 deletion src/Media.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const Media: FC<MediaInterface> = ({
}, [onDimensions]);

return (
<div style={useStyle} onClick={onClick}>
<div className="media" style={useStyle} onClick={onClick}>
<Image
motionProps={motionProps}
alt={alt}
Expand Down

0 comments on commit e661536

Please sign in to comment.