-
-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing avatar with placeholder initials #357
Labels
good first issue
Good for newcomers
help wanted
Extra attention is needed
🚀 enhancement
New feature or request
Comments
rluders
added
help wanted
Extra attention is needed
good first issue
Good for newcomers
labels
Oct 4, 2022
hi @rluders ! |
@iamargentum go ahead. |
iamargentum
added a commit
to iamargentum/flowbite-react
that referenced
this issue
Oct 9, 2022
Add new prop, `placeholderInitials`, to the `Avatar` component. String passed in this prop will be displayed as `Avatar`'s placeholder, if image is not provided. Refs: themesberg#357
iamargentum
added a commit
to iamargentum/flowbite-react
that referenced
this issue
Oct 9, 2022
Update the docs with newly added feature, that allows usage of initials as a placeholder for `Avatar` component themesberg#357
13 tasks
iamargentum
added a commit
to iamargentum/flowbite-react
that referenced
this issue
Oct 11, 2022
iamargentum
added a commit
to iamargentum/flowbite-react
that referenced
this issue
Oct 11, 2022
rluders
pushed a commit
that referenced
this issue
Oct 11, 2022
* feat: allow using initials as `Avatar` placeholder Add new prop, `placeholderInitials`, to the `Avatar` component. String passed in this prop will be displayed as `Avatar`'s placeholder, if image is not provided. Refs: #357 * docs(avatar): update docs with `Placeholder Initials` for `Avatar` Update the docs with newly added feature, that allows usage of initials as a placeholder for `Avatar` component #357 * refactor(avatar): move styles to Theme #357 * test(avatar): add test for initials placeholder #357
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
good first issue
Good for newcomers
help wanted
Extra attention is needed
🚀 enhancement
New feature or request
Describe the solution you'd like
Flowbite React's Avatar component does not provide an avatar that has placeholder initials, unlike flowbite. E.g. https://flowbite.com/docs/components/avatar/ - see "Placeholder Initials".
The solution could be: instead of passing an image URL, Avatar could have another prop called "placeholderInitials" or similar where the developer passes the initials as a string.
Internally:
An suggestion: both should not be filled. If they are, avatar with an image should be display or just throw an error.
The text was updated successfully, but these errors were encountered: