Open ThomasDebrunner opened 7 years ago
In my most basic example, I can't manage to get the cards appear on the screen.
import Cards, { Card } from 'react-swipe-card' export default class Stack extends Component { render() { const { actions, children, login } = this.props const data = ['Alexandre', 'Thomas', 'Lucien'] return ( <div className={style.normal}> <Header>Stack</Header> <Cards onEnd={() => console.log('end')} className='master-root'> {data.map((item, i) => <Card key={i} onSwipeLeft={() => console.log('swipe left')} onSwipeRight={() => console.log('swipe right')}> <h2>{item}</h2> </Card> )} </Cards> </div> ) } }
All it renders is a div with the master-root class set, but without any children. Any idea what could go wrong?
master-root
Can you try with the css file in storybook/style.css ?
master-root need a size
@alexandre-garrec I had the same problem, I think that you must to specify that the CSS is necessary to run it successfully.
In my most basic example, I can't manage to get the cards appear on the screen.
All it renders is a div with the
master-root
class set, but without any children. Any idea what could go wrong?