import React from "react"; import { ComponentStory, ComponentMeta } from "@storybook/react"; import { W3Wrapper } from "./W3Wrapper"; import { useEthers } from "@usedapp/core"; export interface PageProps { user?: {}; onLogin: () => void; onLogout: () => void; onCreateAccount: () => void; } const Web3Component = () => { const library = useEthers(); return (
{library.account}
{library.chainId}
); }; export const Page = () => ( ); export default { title: "Web3 Context Example", component: Page } as ComponentMeta; const Template: ComponentStory = () => ; export const MetamaskExample = Template.bind({});