0.1.5 • Published 4 years ago

@c5/react-login v0.1.5

Weekly downloads
-
License
Apache 2.0
Repository
github
Last release
4 years ago

@c5/react-login

A login component for React.

NPM JavaScript Style Guide

Sample Login Form

Install

npm install --save @c5/react-login

Other Requirements

npm install --save antd tailwind

# Afterward, follow the step-by-step to setup tailwind.
# You can find it here: https://tailwindcss.com/docs/installation/

Props

Attribute NameDescriptionDefault Value
titleSet title of the componentSign In
descriptionSet description under the title
usernameLabelCustomize username labelUsername
passwordLabelCustomize password labelPassword
registrationUrlSet registration url (if any)#
registrationTextSet registration textCreate account
signInTextSet sign in textSign In
forgotPasswordUrlSet forgot password url#
onSubmitA method when submit button is clicked and validation success
onErrorA method when submit button is clicked and validation failed

Usage

import React, { Component } from 'react'
import Login from '@c5/react-login'
import 'antd/dist/antd.css'

const ExampleLogin = () => {
  const onSubmit = values => {
    console.dir(values);
  }

  const onError = err => {
    console.dir(err)
  }

  return <Login
    description='to continue to Cosmiq'
    registrationUrl='https://cosmiq.app'
    forgotPasswordUrl='https://cosmiq.app'
    onSubmit={onSubmit}
    onError={onError} />
}

License

Apache 2.0 © Monolog

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago