Hey there, I've been attempting to place a number in the top left corner of a cart icon without success.
My goal is to achieve a result similar to the image shown here: enter image description here
Here is the code snippet I've been using:
<BagContainer>
<Bag src={bag} hideIcons={hideIcons} title="bag" onClick={openCart}/>
<Number>5</Number>
</BagContainer>
export const BagContainer=styled.div`
position: relative;
width: fit-content;
`
export const Bag= styled.img<{hideIcons:boolean}>`
background: transparent;
border: none;
outline: none;
font-size: 1.8rem;
display: ${(icon) => icon.hideIcons ? 'none' : 'inline'}
`;
export const Number=styled.span`
`