framer-motion-carousel
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "framer-motion-carousel", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A simple framer motion carousel component for React", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -8,22 +8,24 @@ # framer-motion-carousel | ||
```jsx | ||
import * as React from 'react' | ||
import Carousel from 'framer-motion-carousel' | ||
import * as React from "react"; | ||
import Carousel from "framer-motion-carousel"; | ||
const colors = ["#f90", "#ef0", "#e0f"] | ||
const colors = ["#f90", "#ef0", "#e0f"]; | ||
const App = () => ( | ||
<div style={{ width: 600, height: 400 }}> | ||
<Carousel> | ||
{colors.map((item, i) => ( | ||
<div | ||
key={i} | ||
style={{ | ||
width: "100%", | ||
height: "100%", | ||
backgroundColor: colors[i], | ||
}} | ||
></div> | ||
))} | ||
{colors.map((item, i) => ( | ||
<div | ||
key={i} | ||
style={{ | ||
width: "100%", | ||
height: "100%", | ||
backgroundColor: colors[i], | ||
}} | ||
></div> | ||
))} | ||
</Carousel> | ||
) | ||
export default App | ||
</div> | ||
); | ||
export default App; | ||
``` | ||
@@ -33,2 +35,4 @@ | ||
[Live Demo](https://carousel-app-772051431.vercel.app) | ||
![example](https://raw.githubusercontent.com/jiangbo2015/framer-motion-carousel/main/img.jpg) | ||
@@ -35,0 +39,0 @@ |
68
47986
18
492