UNPKG

design-tool-kit-react-js

Version:

Library for faster design implementation

22 lines (18 loc) 363 B
import React, { Component } from "react"; export class Carousel extends Component { constructor(props) { this.state = { index: 0 }; } next(){ console.log('next'); } render() { return ( <> <button>prev</button> <div>{this.props.children[0]}</div> <button onClick = {next}>next</button> </> ); } }