0.0.12 • Published 6 years ago

pyro-components v0.0.12

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

Pyro Components

A big repo containing all of the components for pyro apps.

Install

yarn add pyro-components

All components must be wrapped in a firebase provider (at the top level).

This is how they access firebase.

Components

Firebase Provider

import React from 'react'
import YourApp from './your-app
import { FirebaseProvider } from 'pyro-components'
const firebaseApp = firebase.initializeApp()

const AppWithFirebase = () => (
    <FirebaseProvider {...{
        firebaseApp
    }}>
        <YourApp />
    </FirebaseProvider>
)

Logout Button

TODO

Notification Center

TODO

Auth

import React from 'react'
import { Auth } from 'pyro-components'

// login
const Login = () => (
    <Auth {...{
        isSignUp: false,
        onFail: reason => {
            // reason is an error code from: https://firebase.google.com/docs/reference/js/firebase.auth.Auth#signInWithEmailAndPassword
        },
        onSuccess: user => {
            // user is a https://firebase.google.com/docs/reference/js/firebase.User
        }
    }} />
)

// signup
const Signup = () => (
    <Auth {...{
        isSignUp: false,
        onFail: reason => {
            // reason is an error code from: https://firebase.google.com/docs/reference/js/firebase.auth.Auth#createUserWithEmailAndPassword
        },
        onSuccess: user => {
            // user is a https://firebase.google.com/docs/reference/js/firebase.User
        }
    }} />

)

License

TBD

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago