pineafan | aed3024 | 2021-09-04 09:33:40 +0100 | [diff] [blame^] | 1 | import react, { Component } from "react"; |
Samuel Shuert | 604e31d | 2021-09-02 16:06:20 -0500 | [diff] [blame] | 2 | import Styles from '../styles/tilerow.module.css'; |
Samuel Shuert | 8aac601 | 2021-09-02 13:21:30 -0500 | [diff] [blame] | 3 | |
pineafan | aed3024 | 2021-09-04 09:33:40 +0100 | [diff] [blame^] | 4 | class TileRow extends Component { |
Samuel Shuert | 8aac601 | 2021-09-02 13:21:30 -0500 | [diff] [blame] | 5 | constructor(props) { |
| 6 | super(props); |
| 7 | } |
| 8 | |
| 9 | |
| 10 | render() { |
| 11 | return ( |
| 12 | <div className={Styles.container}> |
| 13 | { |
pineafan | aed3024 | 2021-09-04 09:33:40 +0100 | [diff] [blame^] | 14 | react.Children.toArray(this.props.children).map((item, index) => { |
Samuel Shuert | 8aac601 | 2021-09-02 13:21:30 -0500 | [diff] [blame] | 15 | return <div className={Styles.item} key={index}>{item}</div> |
| 16 | }) |
| 17 | } |
| 18 | </div> |
| 19 | ) |
| 20 | } |
| 21 | } |
| 22 | |
pineafan | aed3024 | 2021-09-04 09:33:40 +0100 | [diff] [blame^] | 23 | export default TileRow; |