re-carousel icon indicating copy to clipboard operation
re-carousel copied to clipboard

basic example?

Open dcsan opened this issue 4 years ago • 1 comments

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.

image

dcsan avatar Jan 10 '20 19:01 dcsan

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

bang9 avatar Oct 28 '20 01:10 bang9