UIAvatar

Properties

Name Type
props props
state state

new UIAvatar(props)

A user avatar component

Can show user images from Gravatar, or a font awesome icon.

Param Type
props props

Example

import {UIAvatar} from 'writer'

render($$) {
    const el = $$('div')

    return el.append(
        $$(UIAvatar, {
          avatarSource: 'gravatar',
          avatarId: 'test.testsson@test.com',
          avatarAlt: 'Alternative text'
      })
    )
}

UIAvatar.props

Properties

Name Type Description
avatarId string ID of the avatar to display
[avatarSource] string "gravatar"
avatarAlt string Alt text

UIAvatar.state

Properties

Name Type Default
avatarIsLoaded Boolean false
loadHasError Boolean false

results matching ""

    No results matching ""