您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

AbstractStatelessAvatar.js 751B

12345678910111213141516171819202122232425262728293031323334353637
  1. // @flow
  2. import { PureComponent } from 'react';
  3. export type Props = {
  4. /**
  5. * Color of the (initials based) avatar, if needed.
  6. */
  7. color?: string,
  8. /**
  9. * Initials to be used to render the initials based avatars.
  10. */
  11. initials?: string,
  12. /**
  13. * Callback to signal the failure of the loading of the URL.
  14. */
  15. onAvatarLoadError?: Function,
  16. /**
  17. * Expected size of the avatar.
  18. */
  19. size?: number;
  20. /**
  21. * The URL of the avatar to render.
  22. */
  23. url?: ?string
  24. };
  25. /**
  26. * Implements an abstract stateless avatar component that renders an avatar purely from what gets passed through
  27. * props.
  28. */
  29. export default class AbstractStatelessAvatar<P: Props> extends PureComponent<P> {}