re-carousel
re-carousel copied to clipboard
basic example?
using create-react-app, added a simple example as per the README
I just see a blank screen. Is CSS or something else required to get up and running?
import React from "react";
import Carousel from 're-carousel'
class KwGame extends React.Component {
render() {
return (
<Carousel auto>
<div style={{backgroundColor: 'tomato', height: '100%'}}>Frame 1</div>
<div style={{backgroundColor: 'orange', height: '100%'}}>Frame 2</div>
<div style={{backgroundColor: 'orchid', height: '100%'}}>Frame 3</div>
</Carousel>
);
}
}
export default KwGame
DOM stuff appears to be there, just doesn't show up.
wrapping up with specific size of container
import React from "react";
import Carousel from 're-carousel'
class KwGame extends React.Component {
render() {
return (
<div style={{width: 300, height: 300}}>
<Carousel auto>
<div style={{backgroundColor: 'tomato', height: '100%'}}>Frame 1</div>
<div style={{backgroundColor: 'orange', height: '100%'}}>Frame 2</div>
<div style={{backgroundColor: 'orchid', height: '100%'}}>Frame 3</div>
</Carousel>
</div>
);
}
}
export default KwGame