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

aws-amplify-react-extended

v2.3.63

Published

AWS Amplify is a JavaScript library for Frontend and mobile developers building cloud-enabled applications.

Downloads

65

Readme

AWS Amplify React Extended

This package adds some additional functionality to the aws-amplify-react package. All documentation for the 'aws-amplify-react' package still applies to the 'aws-amplify-react-extended' package. See below for the extra features made available to you by choosing this package.

AWS Amplify Package - aws-amplify-react

AWS Amplify is a JavaScript library for frontend and mobile developers building cloud-enabled applications. The library is a declarative interface across different categories of operations in order to make common tasks easier to add into your application. The default implementation works with Amazon Web Services (AWS) resources but is designed to be open and pluggable for usage with other cloud services that wish to provide an implementation or custom backends.

aws-amplify-react is one of the AWS Amplify library packages, provide building blocks for React App development. Documentation is available here

Added Features

This package extends the functionality of the aws-amplify-react package in a few ways:

Theming and Images

See Default Theme for an example of how to style and change the images.

Additional 'withAuthenticator' options (usernameAttributes and uiFramework)

  • 'usernameAttributes' specifies whether the username is a 'username' or 'email'.
  • 'uiFramework' switches the default views to use Reactstrap (Bootstrap 4) or Material-UI (Material Design) components.
  • 'autoSignIn' auto signs in after sign up (Default: true)
import { withAuthenticator } from 'aws-amplify-react-extended';

const autoSignIn = false;

// Default
export default withAuthenticator(App);

// Bootstrap (BS4 styles will need to be imported to your app)
export default withAuthenticator(App, false, [], null, null, null, "email", "bootstrap", autoSignIn);

// Material UI
export default withAuthenticator(App, false, [], null, null, null, "username", "material");

Sign up config (Conditionals and multi select)

Adds capability for conditional fields, helper text and multi selects during sign up.

// Custom sign up config 
const signUpConfig = {
  hideAllDefaults: true,
  signUpFields: [
      {
          label: 'Email',
          key: 'username',
          required: true,
          type: 'email',
          placeholder: 'Email',
          displayOrder: 1,
      },
      {
          label: 'Password',
          key: 'password',
          required: true,
          placeholder: 'Password',
          type: 'password',
          helperText: 'Password requirements are etc',
          displayOrder: 2,
      },
      {
          label: 'Role',
          key: 'role',
          custom: true,
          required: true,
          placeholder: 'consumer or contributor',
          displayOrder: 3,
          type: 'radio',
          options: [
              {
                  label: "I want to receive offers",
                  value: "consumer"                
              },
              {
                  label: "I want to provide great services",
                  value: "contributor",
              },                
          ]
      },
      {
          label: 'What services do you offer?',
          key: 'services',
          custom: true,
          required: false,
          conditions: {
              role: "contributor"
          },
          placeholder: '',
          displayOrder: 4,
          type: 'multi',
          options: [
              {
                  label: "Flight",
                  value: "flight"                
              },
              {
                  label: "Hotel",
                  value: "hotel",
              },
              {
                  label: "Car Hire",
                  value: "car",
              },
              {
                  label: "Transfers",
                  value: "transfers",
              },  
              {
                  label: "Activities",
                  value: "activities",
              },                  
          ]
      },
      
  ]
};

export default withAuthenticator(App, false, [], null, null, signUpConfig, "email", "material");

Link to Sign In, Sign up or Forgot Password

Use the 'action' querystring to overwrite the default auth state, for example '?action=signUp'.

Test locally

cd aws-amplify-react-extended
npm link
npm run build
cd examples/create-react-app
npm link aws-amplify-react-extended
npm link ../../node_modules/react
npm start