Skip to content

Commit

Permalink
clean up storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
puncsky committed Apr 17, 2019
1 parent 343ab7f commit 569be8b
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/shared/common/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ export const routes = {
}
};

export default routes["dev"];
export default routes.dev;
File renamed without changes.
2 changes: 1 addition & 1 deletion src/shared/wallet/transfer/transfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import ConfirmContractModal from "../../common/confirm-contract-modal";
import { formItemLayout } from "../../common/form-item-layout";
import { PageTitle } from "../../common/page-title";
import { colors } from "../../common/styles/style-color";
import { BroadcastFailure, BroadcastSuccess } from "../broadcastedTransaction";
import { BroadcastFailure, BroadcastSuccess } from "../broadcast-status";
import { getAntenna } from "../get-antenna";
import { FormItemLabel, inputStyle } from "../wallet";

Expand Down
4 changes: 2 additions & 2 deletions src/shared/wallet/wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import { Account } from "iotex-antenna/lib/account/account";
import { t } from "onefx/lib/iso-i18n";
// @ts-ignore
import { styled } from "onefx/lib/styletron-react";
import { PureComponent } from "react";
import React from "react";
import { PureComponent } from "react";
import { Route, Switch, withRouter } from "react-router";
import { RouteComponentProps } from "react-router-dom";
import { AccountMeta } from "../../api-gateway/resolvers/antenna-types";
import routes from "../common/routes";
import { colors } from "../common/styles/style-color";
import { ContentPadding } from "../common/styles/style-padding";
import AccountSection from "./account-section";
Expand All @@ -22,7 +23,6 @@ import { getAntenna } from "./get-antenna";
import NewWallet from "./new-wallet";
import Transfer from "./transfer/transfer";
import UnlockWallet from "./unlock-wallet";
import routes from "../common/routes";

export interface State {
wallet: Account | null;
Expand Down
35 changes: 29 additions & 6 deletions stories/index.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ import { linkTo } from "@storybook/addon-links";
import { Welcome } from "@storybook/react/demo";
import { NotFound } from "../src/shared/common/not-found";
import { TestRoot } from "../src/shared/common/test-root";
import WriteContractModal from "../src/shared/wallet/write-contract-modal";
import WriteContractModal from "../src/shared/common/write-contract-modal";
import { Deploy } from "../src/shared/wallet/contract/deploy";
import ConfirmContractModal from "../src/shared/common/confirm-contract-modal";
import {
BroadcastFailure,
BroadcastSuccess
} from "../src/shared/wallet/broadcast-status";

storiesOf("Welcome", module)
.add("to Storybook", () => <Welcome showApp={linkTo("Button")} />)
Expand All @@ -28,8 +33,26 @@ storiesOf("Pages", module).add("NotFound", () => (
</TestRoot>
));

storiesOf("Smart Contract", module).add("Deploy", () => (
<TestRoot>
<Deploy />
</TestRoot>
));
storiesOf("Smart Contract", module)
.add("Deploy", () => (
<TestRoot>
<Deploy />
</TestRoot>
))
.add("ConfirmContractModal", () => (
<TestRoot>
<ConfirmContractModal showModal={true} />
</TestRoot>
));

storiesOf("Boradcast status", module)
.add("BroadcastSuccess", () => (
<TestRoot>
<BroadcastSuccess type={"transfer"} />
</TestRoot>
))
.add("BroadcastFailure", () => (
<TestRoot>
<BroadcastFailure />
</TestRoot>
));

0 comments on commit 569be8b

Please sign in to comment.