0.0.11 • Published 2 years ago

@pongo-ui/react-avatar v0.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Avatar

The Avatar provides a recognizable icon for a user.

Use

  1. Install the @pongo-ui/react-avatar component.

Using NPM

npm install @pongo-ui/react-avatar

Using Yarn

yarn add @pongo-ui/react-avatar
  1. Install the @pongo-ui/react-provider and our theme tokens from @pongo-ui/react-theme

  2. Set up the provider in your app:

import { Provider } from '@pongo-ui/react-provider'
import { webLightTheme } from '@pongo-ui/react-theme'

const MyApp = () => {
  return (
    <Provider theme={webLightTheme}>
    <Provider>
  )
}
  1. Integrate the Avatar component.
import { Provider } from '@pongo-ui/react-provider'
import { webLightTheme } from '@pongo-ui/react-theme'
import { Avatar } from '@pongo-ui/react-avatar'

const MyApp = () => {
  return (
    <Provider theme={webLightTheme}>
        <Avatar name="Your Name"/>
    <Provider>
  )
}

API

To learn more about the Avatar API take a look at the Avatar Interface file.