npm.io
2.19.8 • Published 8 years ago

evergreen-avatar

Licence
MIT
Version
2.19.8
Deps
6
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Avatar

evergreen-avatar is a package exporting a Avatar React component. Avatars display a circle containing a user profile image. If the image is not available, the initials will be shown.

Design Example

avatar default usage avatar sizes avatar manual usage

Prop types and default props

static propTypes = {
  ...Image.propTypes,
  size: PropTypes.number,
  name: PropTypes.string,
  // hash value defaults to name
  hashValue: PropTypes.string,
  hash: PropTypes.func,
  isSolid: PropTypes.bool,
  appearance: PropTypes.oneOf(keysFillAppearances),
  getInitials: PropTypes.func,
}

static defaultProps = {
  size: 24,
  hash: globalHash,
  isSolid: false,
  getInitials: globalGetInitials,
}

Keywords