import * as React from 'react'; import PropTypes from 'prop-types'; import './Zeile.css'; import Besorgung from './Besorgung'; export default function Zeile({besorgung, onSelect, selectedLine}) { return( {onSelect(besorgung.name)}} > {Object.keys(Besorgung.properties).map(property =>{ const besorgungsprop = Besorgung.properties[property]; return( {besorgung[property]} ); })} ); } Zeile.propTypes = { besorgung: PropTypes.object.isRequired, onSelect: PropTypes.func, selectedLine: PropTypes.string, };