pineafan | 15b813d | 2022-02-13 10:06:09 +0000 | [diff] [blame^] | 1 | import { Component } from "react"; |
| 2 | import Styles from '../styles/scroller.module.css'; |
| 3 | |
| 4 | class Scroller extends Component { |
| 5 | constructor(props) { |
| 6 | super(props); |
| 7 | } |
| 8 | render() { |
| 9 | this.props.text = this.props.text.concat(this.props.text); |
| 10 | return ( |
| 11 | <div className={Styles.container}> |
| 12 | { |
| 13 | this.props.text.map((item, index) => { |
| 14 | console.log([this.props.text, this.props.text]) |
| 15 | return <div className={Styles.item} key={index}>{item}</div>; |
| 16 | }) |
| 17 | } |
| 18 | </div> |
| 19 | ) |
| 20 | } |
| 21 | } |
| 22 | export default Scroller; |