@pongo-ui/react-avatar
v0.0.11
Published
An avatar component used to display a users icon.
Downloads
5
Readme
Avatar
The Avatar provides a recognizable icon for a user.
Use
- Install the @pongo-ui/react-avatar component.
Using NPM
npm install @pongo-ui/react-avatar
Using Yarn
yarn add @pongo-ui/react-avatar
Install the @pongo-ui/react-provider and our theme tokens from @pongo-ui/react-theme
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>
)
}
- 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.