boringdesigners / boring-avatars

Boring avatars is an open source React library that generates custom, SVG-based avatars from any username and color palette.
https://boringavatars.com
MIT License
5.7k stars 200 forks source link

Adds support for a new `Image` variant and an accompanying `src` prop. #61

Closed ustincameron closed 1 year ago

ustincameron commented 1 year ago

Hi there, I'm a big fan of the boring-avatars library, but need to be able to display either an uploaded user photo or a placeholder avatar, depending on whether the user has uploaded a photo or not.

To address this, I've added a new image variant that can be used with a new src prop to display an image. The Image variant supports both the round and square modes, making it easy to "upgrade" the avatar without changing the component.

I hope that others will find this new variant useful as well!

Screen Shot 2023-02-16 at 10 37 09 PM Screen Shot 2023-02-16 at 10 37 17 PM
github-actions[bot] commented 1 year ago

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

ustincameron commented 1 year ago

Can we get this merged in?

github-actions[bot] commented 1 year ago

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

ustincameron commented 1 year ago

This should be merged in.