Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic example? #128

Open
dcsan opened this issue Jan 10, 2020 · 1 comment
Open

basic example? #128

dcsan opened this issue Jan 10, 2020 · 1 comment

Comments

@dcsan
Copy link

dcsan commented Jan 10, 2020

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

@bang9
Copy link

bang9 commented Oct 28, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants