pineafan | aed3024 | 2021-09-04 09:33:40 +0100 | [diff] [blame] | 1 | import react, { Component } from "react"; |
pineafan | e0283a8 | 2022-02-13 10:05:56 +0000 | [diff] [blame^] | 2 | import Styles from '../styles/Components/cardrow.module.css'; |
pineafan | a5ce910 | 2021-09-02 17:21:31 +0100 | [diff] [blame] | 3 | |
| 4 | class CardRow extends Component { |
| 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) => { |
pineafan | a5ce910 | 2021-09-02 17:21:31 +0100 | [diff] [blame] | 15 | return <div className={Styles.item} key={index}>{item}</div> |
| 16 | }) |
| 17 | } |
| 18 | </div> |
| 19 | ) |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | export default CardRow; |