The new Avatar control is very cool when using Prime Icons!
However, I'm now trying to use an image and put it into the circle:
Code: Select all
<Avatar image={profilePicUrl} className="p-mr-2" size="xlarge" shape="circle" />
The picture is displayed, however the shape="circle" doesn't seem to be adhered to (it generates a square image, which happens to be the default option according to the documentation).
I reviewed the PrimeReact documentation and tried to figure out how they did it: I downloaded their "rounded pictures", and it appears they cheated and rounded the corners within the images rather than taking square images and using the "round" functionality - hmmm - maybe they encountered the same problem I have.
At any rate, has anyone been successful with rounding corners with an image in the component? I've seen on the w3schools that rounded images are a relatively easy style:
Code: Select all
img {
border-radius: 50%;
}
Code: Select all
<Avatar image={profilePicUrl} className="p-mr-2" style={{ borderRadius: '50%' }} size="xlarge" shape="circle" />
I'd prefer to keep the logic within the component if possible.
Thanks in Advance,
Sean