npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-signup-login-component

v1.2.0

Published

[![Greenkeeper badge](https://badges.greenkeeper.io/akiokio/ReactSignupLoginComponent.svg)](https://greenkeeper.io/) [![Coverage Status](https://coveralls.io/repos/github/akiokio/ReactSignupLoginComponent/badge.svg?branch=master)](https://coveralls.io/git

Downloads

91

Readme

ReactSignupLoginComponent

Greenkeeper badge Coverage Status Build Status semantic-release

Check out the examples to learn how to use it.

Features

  • Updated to React 16 🎉
  • Login
  • Signup
  • Recover Password
  • Callbacks for every action
  • 100% test coverage
  • Drop-in component
  • Custom labels for any text nice for customization or internationalization

How to use it

Installing

Using npm:

$ npm install react-signup-login-component

Using yarn:

$ yarn add react-signup-login-component

Getting started

import ReactSignupLoginComponent from 'react-signup-login-component';

const LoginPage = (props) => {
    const signupWasClickedCallback = (data) => {
      console.log(data);
      alert('Signup callback, see log on the console to see the data.');
    };
    const loginWasClickedCallback = (data) => {
      console.log(data);
      alert('Login callback, see log on the console to see the data.');
    };
    const recoverPasswordWasClickedCallback = (data) => {
      console.log(data);
      alert('Recover password callback, see log on the console to see the data.');
    };
    return (
        <div>
            <ReactSignupLoginComponent
                title="My awesome company"
                handleSignup={signupWasClickedCallback}
                handleLogin={loginWasClickedCallback}
                handleRecoverPassword={recoverPasswordWasClickedCallback}
            />
        </div>
    );
};

export default LoginPage;

Configuration (Props) options

Required props

handleSignup(object)

Called when the users clicks on the signup button and the form is valid return: An object with the attributes: username, password and passwordConfirmation example:

{
  username: 'johndoe',
  password: '1234%##D',
  passwordConfirmation: '1234%##D'
};

handleLogin(object)

Called when the users clicks on the login button and the form is valid return: An object with the attributes: username and password example:

{
  username: 'johndoe',
  password: '1234%##D'
};

handleRecoverPassword(object)

Called when the users clicks on the recover password button and the form is valid return: An object with the attributes: username example:

{
  username: 'johndoe'
};

Optional props

title

Sets the h1 title on the login box example:

<Wrapper
  title="My awesome company"
  {...requiredProps} // Spread the default props. It's here to illustrate the example
/>

styles

You can overhide the component style passing an object to the styles prop. Here's an example with all the possible keys. The values can be any valid css property. example:

<ReactSignupLoginComponent
  styles={{
    mainWrapper: { backgroundColor: 'blue' },
    mainTitle: { color: 'red' },
    flipper: { transition: '0.1s' },
    signup: {
      wrapper: { backgroundColor: 'yellow' },
      inputWrapper: { backgroundColor: 'AliceBlue' },
      buttonsWrapper: { backgroundColor: 'Aqua' },
      input: { backgroundColor: 'LavenderBlush' },
      recoverPassword: {},
      button: { backgroundColor: 'LightCoral' },
    },
    login: {
      wrapper: { backgroundColor: 'yellow' },
      inputWrapper: { backgroundColor: 'AliceBlue' },
      buttonsWrapper: { backgroundColor: 'Aqua' },
      input: { backgroundColor: 'LavenderBlush' },
      recoverPasswordWrapper: { backgroundColor: 'MediumBlue' },
      recoverPasswordButton: { backgroundColor: 'OldLace ' },
      button: { backgroundColor: 'LightCoral' },
    },
    recoverPassword: {
      wrapper: { backgroundColor: 'yellow' },
      inputWrapper: { backgroundColor: 'AliceBlue' },
      buttonsWrapper: { backgroundColor: 'Aqua' },
      input: { backgroundColor: 'LavenderBlush' },
      button: { backgroundColor: 'LightCoral' },
    },
  }}
  {...requiredProps} // Spread the default props. It's here to illustrate the example
/>

Custom labels

Here's the list of possible custom labels you can use (check the storybook for usage):

usernameCustomLabel="Anything you want"
passwordCustomLabel="Anything you want"
passwordConfirmationCustomLabel="Anything you want"
recoverPasswordCustomLabel="Anything you want"
signupCustomLabel="Anything you want"
submitLoginCustomLabel="Anything you want"
goToLoginCustomLabel="Anything you want"
submitSignupCustomLabel="Anything you want"
goToSignupCustomLabel="Anything you want"
submitRecoverPasswordCustomLabel="Anything you want"

Tests

We have a 100% percent test coverage, to run the tests locally:

$ git clone https://github.com/akiokio/ReactSignupLoginComponent
$ cd ReactSignupLoginComponent
$ yarn install
$ yarn test
or to get the coverage report
$ yarn coverage

Issues

If you found something wrong with the component please open an issue here: https://github.com/akiokio/ReactSignupLoginComponent/issues/new

Notes

This readme is a working in progress, feel free to help update it making a pull request

License

Licensed under the MIT License: https://opensource.org/licenses/MIT