I am currently utilizing React with Typescript.
- How can I incorporate an image into my button?
I've attempted to do so without any errors, but the button appears blank. - What's the best way to style my button element using Emotion CSS in this context?
import React from "react";
function CustomButton(props){
let customStyle = {
width:24,
height:24,
src: "../images/abc.png"
};
return(
<button style={customStyle} onClick={() => props.handleClick()}>{props.label}</button>
);
}
return (
<div style={style}>
<CustomButton src={"../images/abc.png"} handleClick = {props.incrementScore}/>
</div>
);
}