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

edge-login-ui-react

v0.6.2

Published

Edge login UI, as React components

Downloads

66

Readme

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.