0.0.12 • Published 8 years ago

pyro-components v0.0.12

Weekly downloads
2
License
MIT
Repository
github
Last release
8 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

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago