@c5/react-login
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

@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 Name Description Default Value
title Set title of the component Sign In
description Set description under the title
usernameLabel Customize username label Username
passwordLabel Customize password label Password
registrationUrl Set registration url (if any) #
registrationText Set registration text Create account
signInText Set sign in text Sign In
forgotPasswordUrl Set forgot password url #
onSubmit A method when submit button is clicked and validation success
onError A 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

Readme

Keywords

none

Package Sidebar

Install

npm i @c5/react-login

Weekly Downloads

1

Version

0.1.5

License

Apache 2.0

Unpacked Size

19.3 kB

Total Files

8

Last publish

Collaborators

  • madebyais