7 | {children &&
8 | React.Children.toArray(children)
9 | .filter(child => child)
10 | .map((child, index) =>
{child}
)}
11 |
12 | );
13 | }
14 |
15 | export default ListItem;
16 |
--------------------------------------------------------------------------------
/qirk-parent/qirk-front/front/src/components/ListItem/ListItem.sass:
--------------------------------------------------------------------------------
1 | .list-item
2 | display: flex
3 | justify-content: space-between
4 | margin-bottom: 10px
5 | padding: 10px
6 | background-color: #f0f0f0
7 | border: 1px solid #ededed
8 | div
9 | width: 100%
10 | text-align: center
11 |
--------------------------------------------------------------------------------
/qirk-parent/qirk-front/front/src/components/ListItemHeader/ListItemHeader.jsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import PropTypes from "prop-types";
3 | import "./ListItemHeader.sass";
4 |
5 | function ListItemHeader({ fields, className }) {
6 | return (
7 |