import * as React from "react" import { storiesOf } from "@storybook/react" import styled from "styled-components" import * as common from "jamplay-common/client" import { theme } from "../.." import NavBar, { paddingTop } from "." import NotificationMock from "./NotificationMock" import Provider from "./Provider" import UserCard from "./UserInfo/UserCard" import UserInfo from "./UserInfo/component" const LayoutContainer = styled.div` ${paddingTop}; ` const notification = "https://staging-notification.jamplay.world" const providerOptions = { uri: "http://localhost:8080", theme, services: [ { name: "nap", uri: "http://localhost:3000/graphql" }, { name: "notification", uri: notification + "/graphql" } ] } @common.provider(providerOptions) class AuthenProvider extends React.Component { public render() { return this.props.children } } // tslint:disable-next-line:max-classes-per-file @common.provider(Object.assign({}, providerOptions, { getToken: () => null })) class GuestProvider extends React.Component { public render() { return this.props.children } } storiesOf("NavigationBar/NotificationMock", module) .addDecorator((story) => {story()}) .add("withService", () => ) storiesOf("NavigationBar/Guest", module) .addDecorator((story) => {story()}) .add("Navbar", () => ( )) .add("with fix position", () => ( {" " .split("") // tslint:disable-next-line:jsx-key .map((x, idx) =>
test
)}
)) // tslint:disable-next-line:max-classes-per-file class Toggle extends React.Component { public state = { show: true } public render() { return (
{/* tslint:disable-next-line:jsx-no-lambda */} {this.state.show ? : null}
) } } storiesOf("NavigationBar/WithAuthen", module) .addDecorator((story) => {story()}) .add("navbar", () => (
)) .add("user info with cache", () => ( )) .add("user info", () => ( )) .add("user card", () => ( ))