I'm trying to figure out is it possible to pass down a component as a prop. So for this button component i want to make it so i could pass down images into the span, where i currently have ArrowRight.
export default function Button({ text }) {
const [arrowColor, setArrowColor] = useState(false)
return (
<div>
<button
className={styles.button}
onMouseEnter={() => setArrowColor(true)}
onMouseLeave={() => setArrowColor(false)}
>
{text}
<span className={styles.rightArrow}>
<ArrowRight fill={`${arrowColor ? "white" : "black" }`} />
</span>
</button>
</div>
)
}```