I am relatively new in React
I am trying to create some component where image is aligned left to all text fields. The code is as following
function MyCard(props) {
const imgStyle = {
float: "left",
margin: "0 15px 0 0"
};
return (
<>
<p></p>
<div>
<img src={props.imgpath}/>
<h3>{props.name1}</h3>
{props.name2}
{props.name3}
</div>
<p></p>
</>
);
}
It can be list of such components displayed in the column
What’s wrong/missing in the definition ?
Thanks in advance