-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5536b82
commit 08cbb08
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...i-components/src/components/amplify-authenticator/amplify-authenticator.react.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: {}, | ||
}} | ||
/> | ||
); |