@maruware/material-ui-login
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Material UI Login

Simple Login UI Component using Material UI

screenshot

Install

yarn add @maruware/material-ui-login

Usage

import { Login, AuthInfo } from '@maruware/material-ui-login'

export default function LoginPage() {
  const signIn = async ({ username, password }: AuthInfo) => {
    const client = new ApiClient(false)
    client
      .login({ username, password })
      .then((data) => {
        console.log('success')
      })
      .catch(() => {
        console.log('failed')
      })
  }

  return (
    <Login
      onSubmit={signIn}
      usernameLabel="User ID" // default: User name
      passwordLabel="Your Password" // default: Password
      submitButtonLabel="Log in" // default: Sign in
      backgroundColor="#000" // default: blueGrey[800]
    />
  )
}

Readme

Keywords

Package Sidebar

Install

npm i @maruware/material-ui-login

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

6.99 kB

Total Files

8

Last publish

Collaborators

  • maruware