How to use the avataaars.AvatarStyle.Circle function in avataaars

To help you get started, we’ve selected a few avataaars examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fangpenlin / avataaars-generator / src / components / AvatarForm.tsx View on Github external
})
    const labelCol = 3
    const inputCol = 9
    return (
      <form>
        
          
            Avatar Style
          
          
            <label>
              <input checked="{avatarStyle" value="{AvatarStyle.Circle}" name="avatar-style" id="avatar-style-circle" type="radio">{' '}
              Circle
            </label>{' '}
            <label>
              <input checked="{avatarStyle" value="{AvatarStyle.Transparent}" name="avatar-style" id="avatar-style-transparent" type="radio">{' '}
              Transparent
            </label></form>
github fangpenlin / avataaars-generator / src / components / AvatarForm.tsx View on Github external
const labelCol = 3
    const inputCol = 9
    return (
      <form>
        
          
            Avatar Style
          
          
            <label>
              <input checked="{avatarStyle" value="{AvatarStyle.Circle}" name="avatar-style" id="avatar-style-circle" type="radio">{' '}
              Circle
            </label>{' '}
            <label>
              <input checked="{avatarStyle" value="{AvatarStyle.Transparent}" name="avatar-style" id="avatar-style-transparent" type="radio">{' '}
              Transparent
            </label>
          </form>
github fangpenlin / avataaars-generator / src / components / Main.tsx View on Github external
interface State {
  displayComponentCode: boolean,
  displayComponentImg: boolean
}

function capitalizeFirstLetter (text: string) {
  return text.charAt(0).toUpperCase() + text.slice(1)
}

export class Main extends React.Component {
  static childContextTypes = {
    optionContext: PropTypes.instanceOf(OptionContext)
  }
  static defaultProps = {
    avatarStyle: AvatarStyle.Circle
  }

  state = {
    displayComponentCode: false,
    displayComponentImg: false
  }

  private avatarRef: Avatar | null = null
  private canvasRef: HTMLCanvasElement | null = null
  private optionContext: OptionContext = new OptionContext(allOptions)

  getChildContext () {
    return { optionContext: this.optionContext }
  }

  componentWillReceiveProps (nextProps: Props) {
github fangpenlin / avataaars-generator / src / components / Renderer.tsx View on Github external
updateType
      }
    ])
  ),
  avatarStyle: {
    type: UrlQueryParamTypes.string,
    updateType
  }
}

export class Renderer extends React.Component {
  static childContextTypes = {
    optionContext: PropTypes.instanceOf(OptionContext)
  }
  static defaultProps = {
    avatarStyle: AvatarStyle.Circle
  }

  private optionContext: OptionContext = new OptionContext(allOptions)

  getChildContext () {
    return { optionContext: this.optionContext }
  }

  componentWillReceiveProps (nextProps: Props) {
    this.updateOptionContext(nextProps)
  }

  componentWillMount () {
    this.updateOptionContext(this.props)
  }

avataaars

React component for avataaars

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis