Skip to content

Commit

Permalink
bump onefx-auth-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
puncsky committed Sep 22, 2020
1 parent 18b9c66 commit c1e4eeb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
18 changes: 11 additions & 7 deletions packages/common-components/src/storybook-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { Theme, ThemeProvider } from "onefx/lib/styletron-react";
import { THEME } from "onefx/lib/styletron-react/theme-provider";
import { Client as StyletronClient } from "styletron-engine-atomic";
import { Provider as StyletronProvider } from "styletron-react";
import { Provider } from "react-redux";
import { configureStore } from "onefx/lib/iso-react-render/root/configure-store";

const styletron = new StyletronClient({ prefix: "_" });

Expand Down Expand Up @@ -52,13 +54,15 @@ export const WrapThemeProvider: React.FC = ({ children }) => {
export const themeDecorator = () =>
function Inner(story: Story): JSX.Element {
return (
<WrapThemeProvider>
<Overlay>
<MobileContent>
<BrowserRouter>{React.createElement(story)}</BrowserRouter>
</MobileContent>
</Overlay>
</WrapThemeProvider>
<Provider store={configureStore({ base: {} })}>
<WrapThemeProvider>
<Overlay>
<MobileContent>
<BrowserRouter>{React.createElement(story)}</BrowserRouter>
</MobileContent>
</Overlay>
</WrapThemeProvider>
</Provider>
);
};

Expand Down
4 changes: 3 additions & 1 deletion packages/onefx-auth-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-test-renderer": "16.13.1",
"safe-json-globals": "^2.1.0",
"source-map-loader": "0.2.4",
"styletron-engine-atomic": "^1.4.6",
"styletron-react": "^5.2.7",
Expand Down Expand Up @@ -142,7 +143,8 @@
"onefx-common-components": "^2.4.3",
"react": "^16.8.6",
"react-redux": "^7.2.1",
"styletron-engine-atomic": "^1.1.0"
"styletron-engine-atomic": "^1.1.0",
"safe-json-globals": "^2.1.0"
},
"dependencies": {
"@types/validator": "^13.1.0",
Expand Down
8 changes: 3 additions & 5 deletions packages/onefx-auth-provider/src/sign-in.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import React from "react";
import { themeDecorator } from "onefx-common-components/lib/storybook-utils";
import { EmailField } from "./email-password-identity-provider/view/email-field";
import { SignIn } from "./email-password-identity-provider/view/sign-in";

export const Standard: React.FC = () => (
<EmailField error={"error message"} defaultValue={"yo"} />
);
export const Standard: React.FC = () => <SignIn />;

export default {
component: EmailField,
component: SignIn,
decorators: [themeDecorator()],
title: "onefx-auth-provider|SignIn"
};

0 comments on commit c1e4eeb

Please sign in to comment.