Skip to content

Commit

Permalink
Add AmplifyAuthenticator stories
Browse files Browse the repository at this point in the history
  • Loading branch information
ericclemmons committed Jan 7, 2020
1 parent 5536b82 commit 08cbb08
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/** @jsx createElement */

import * as knobs from '@storybook/addon-knobs';
import { createElement } from 'react';
import { render } from 'react-dom';

import { AmplifyAuthenticator } from '../../../../amplify-ui-react';

console.log({ AmplifyAuthenticator });

export default {
title: 'amplify-authenticator/react',
decorators: [
story => {
const root = document.createElement('main');

render(story(), root);

return root;
},
],
};

export const defaults = () => <AmplifyAuthenticator />;

export const withFederated = () => (
<AmplifyAuthenticator
federated={{
amazonClientId: knobs.text('Amazon client ID', 'amazon_client_id'),
auth0Config: {
clientID: knobs.text('Auth0 client ID', 'auth0_client_id'),
domain: knobs.text('Auth0 account domain', 'example.auth0.com'),
redirectUri: 'http://localhost:3000/',
responseType: 'token id_token',
},
facebookAppId: knobs.text('Facebook app ID', 'facebook_app_id'),
googleClientId: knobs.text('Google client ID', 'google_client_id'),
oauthConfig: {},
}}
/>
);

0 comments on commit 08cbb08

Please sign in to comment.