I am trying to create some component where image is aligned left to all text fields. The code is as follows
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?
1