@cebus/react-avatar
v0.0.2
Published
An avatar component used to display a users icon.
Downloads
17
Readme
Avatar
The Avatar provides a recognizable icon for a user.
Use
- Install the @cebus/react-avatar component.
Using NPM
npm install @cebus/react-avatar
Using Yarn
yarn add @cebus/react-avatar
Install the @cebus/react-provider and our theme tokens from @cebus/react-theme
Set up the provider in your app:
import { Provider } from '@cebus/react-provider'
import { webLightTheme } from '@cebus/react-theme'
const MyApp = () => {
return (
<Provider theme={webLightTheme}>
<Provider>
)
}
- Integrate the Avatar component.
import { Provider } from '@cebus/react-provider'
import { webLightTheme } from '@cebus/react-theme'
import { Avatar } from '@cebus/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.