themesberg / flowbite-react

Official React components built for Flowbite and Tailwind CSS
https://flowbite-react.com
MIT License
1.82k stars 406 forks source link

Add `Edit` and `Delete` buttons to Avatar component #1175

Closed Gauravdarkslayer closed 8 months ago

Gauravdarkslayer commented 8 months ago

Summary

Currently we have avatar component which does the great job but implementing an edit & delete button along with it would be better. Example screenshot: image

Context

Most of the times people add profile avatars while editing their user's profile, so we can extend the use of this component further to provide edit & delete icons with buttons so that user can trigger their method accordingly.

rluders commented 8 months ago

@Gauravdarkslayer

I don't see it here: https://flowbite.com/docs/components/avatar/

It should be possible to implement this component, but I don't think that it needs/should be at this library since we only reflect the standard flowbite components in a react-way.

Gauravdarkslayer commented 8 months ago

Sure @rluders , here it is

General version: https://flowbite.com/docs/components/avatar/

React version: https://www.flowbite-react.com/docs/components/avatar

rluders commented 8 months ago

I would say that this is a no. The standard library doesn't support the requested behavior by default, you can use the Avatar component to build a second component that fits your needs.