0.0.3 • Published 4 years ago

react-avatar-firebase v0.0.3

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

react-avatar-firebase

Easily Avatar on Firebase Storage

npm.io npm.io npm.io npm.io npm.io

Install

npm install --save react-avatar-firebase

Documentation

Use react-avatar-firebase for upload avatar on Firebase Storage.

PropsDefinition
pathToStorageName of folder/path where you will save your avatar on storage
imageSrcPass a image url to render
handleGetImageCallback that gives you a return of upload of image on storage
animationTimedefines hover avatar wrapper animation time
sizedefines avatar wrapper px size
borderColordefines border color
borderOpacitydefines border opacity
readOnlyTrue for disable image selection
storageObject 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 App

Local test

Run yarn start at root folder and at example folder

License

MIT © MarcelloVSilva