0.0.3 • Published 6 years ago
react-avatar-firebase v0.0.3
react-avatar-firebase
Easily Avatar on Firebase Storage
Install
npm install --save react-avatar-firebaseDocumentation
Use react-avatar-firebase for upload avatar on Firebase Storage.
| Props | Definition |
|---|---|
| pathToStorage | Name of folder/path where you will save your avatar on storage |
| imageSrc | Pass a image url to render |
| handleGetImage | Callback that gives you a return of upload of image on storage |
| animationTime | defines hover avatar wrapper animation time |
| size | defines avatar wrapper px size |
| borderColor | defines border color |
| borderOpacity | defines border opacity |
| readOnly | True for disable image selection |
| storage | Object ref of firebase storage reference |
Usage
import React from 'react'
import RAF from 'react-avatar-firebase'
const App = () => {
return (
<div>
<RAF
pathToStorage="avatars"
imageSrc={imageSrc}
handleGetImage={handleGetImage}
animationTime='0.3s'
size={128}
borderColor='#e2e2e2'
borderOpacity={0.9}
storage={'<your firebase storage instance here>'}
/>
</div>
)
}
export default AppLocal test
Run yarn start at root folder and at example folder
License
MIT © MarcelloVSilva