-
Notifications
You must be signed in to change notification settings - Fork 278
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
Add customizable placeholder feature to Avatar component #1433
Conversation
- Introduced `fallbackSrc` prop for customizable placeholder images. - Updated documentation with examples for new feature. - Revised Svelte code to handle fallback image display.
@itsusif is attempting to deploy a commit to the Themesberg Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes enhance the Changes
Poem
Tip OpenAI O1 model for chat
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Additional comments not posted (10)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Why can't we use flowbite-svelte/src/lib/avatar/Avatar.svelte Lines 59 to 62 in 6b46e6b
|
Hi @shinokada, Thanks for the suggestion! In the current implementation, the component already manages the case where the default SVG avatar is used if
This gives users the flexibility to either specify a custom fallback or rely on the default SVG. Relevant code:
Let me know if this works or if you have any other suggestions! |
I close the PR for now. Thank you for your contribution. |
This pull request introduces the
fallbackSrc
prop to the Avatar component, allowing for customizable placeholder images when the main image fails to load. It also updates the documentation with examples of the new feature and revises the Svelte code to handle fallback image display.Status:
Checks:
Additional Information:
This update enhances the Avatar component by providing an option to specify a fallback image. It is useful for scenarios where a default placeholder image is preferred if the main image fails to load.
Summary by CodeRabbit
New Features
Documentation