Skip to content
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

onError fallback component #146

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

zhuber
Copy link

@zhuber zhuber commented Jul 12, 2018

This which allows users to specify a fallback component, which is great for folks who do not want to fallback to a different image source. For example, users can have a "default profile" component that gets passed in as the fallback prop.

Related feature request:

#134

Usage

const fallbackComponent = <div>Fallback!</div>

return (
  <Gravatar email={email} size={40} default='404' className={s.avatar} fallback={fallbackComponent} />
)

This which allows users to specify a fallback component, which is great for folks who do not want to fallback to a different image source. For example, users can have a "default profile" component that gets passed in as the `fallback` prop.

# Related feature request:

KyleAMathews#134
@jphenow
Copy link

jphenow commented Oct 12, 2018

This would be great

@getaaron
Copy link
Collaborator

@KyleAMathews I resolved the conflicts in the PR (and in the other open one). I'm not sure what the demand is like for the feature but it seems reasonable to me, wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants