Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

edge-login-ui-react

Package Overview
Dependencies
Maintainers
6
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edge-login-ui-react

Edge login UI, as React components

latest
npmnpm
Version
0.6.2
Version published
Weekly downloads
22
-56%
Maintainers
6
Weekly downloads
 
Created
Source

Edge Login UI React Components

This library exports a collection of React components which implement the Edge login user interface. These components are currently compatible with the web version of React, but we will eventually merge the React Native components into this library as well.

If you are building your project for the web, consider using edge-login-ui-web instead of this library. That library bundles these components in a way that provides a simpler coding interface and better security.

Usage

Install this library into your project using a tool like NPM or Yarn, and then import it into your project:

import { LoginScreen, AccountScreen } from 'edge-login-ui-react'

You will also have to import edge-login-ui-react/lib/styles.css into your HTML for these components to receive the proper CSS styling. You will also need the following line for mobile responsiveness:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

This library provides the following components:

  • LoginScreen - Provides the ability to create or log into accounts.
  • AccountScreen - Provides controls for changing the credentials on an account.

You can render them in the normal way:

// Inside some React component:
render () {
  return (
    <LoginScreen
      accountOptions={{}}
      context={this.props.context}
      onClose={this.onClose}
      onError={this.onError}
      onLogin={this.onLogin}
      vendorName={strings.APP_NAME}
      vendorImageUrl={strings.APP_LOGO}
    />
  )
}

LoginScreen

The LoginScreen component accepts the following props:

  • accountOptions - An EdgeAccountOptions structure to pass to the EdgeAccount object on login.
  • context - An EdgeContext object, created using the makeEdgeAccount function from edge-core-js.
  • onClose - Called when the user closes the window.
  • onError - Called if the screen encounters an error.
  • onLogin - Receives an EdgeAccount object when the user logs in.
  • vendorImageUrl - A logo to display at the top of the window.
  • vendorName - An application name to display in the window.

AccountScreen

The AccountScreen component accepts the following props:

  • account - An EdgeAccount object for the logged-in user.
  • context - The EdgeContext that was used to log the user in.
  • onClose - Called when the user closes the window.
  • onError - Called if the screen encounters an error.
  • vendorImageUrl - A logo to display at the top of the window.
  • vendorName - An application name to display in the window.

Contributing

Run yarn to install the project depenencies and perform the initial build. Then use yarn start to launch a development server.

Keywords

Airbitz

FAQs

Package last updated on 03 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts