How to use the storybook/storiesOf.storiesOf function in storybook

To help you get started, we’ve selected a few storybook examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github artsy / reaction / src / Apps / Artwork / Components / ArtworkSidebar / __stories__ / ArtworkSidebarClassification.story.tsx View on Github external
import {
  ArtworkWithClassification,
  ArtworkWithoutClassification,
} from "Apps/__tests__/Fixtures/Artwork/ArtworkSidebar/ArtworkSidebarClassification"
import { ArtworkSidebarClassification as Classification } from "Apps/Artwork/Components/ArtworkSidebar/ArtworkSidebarClassification"
import React from "react"
import { storiesOf } from "storybook/storiesOf"
import { Section } from "Utils/Section"

storiesOf("Apps/Artwork/Components/Sidebar", module).add(
  "Classification",
  () => {
    return (
      
        <section title="Artwork with Classification">
          
        </section>
        <section title="Artwork without Classification">
          
        </section>
      
    )
  }
)
github artsy / reaction / src / Components / v2 / __stories__ / EntityHeader.story.tsx View on Github external
import { EntityHeader } from "Components/v2/EntityHeader"
import { RelayStubProvider } from "DevTools/RelayStubProvider"
import React from "react"
import { storiesOf } from "storybook/storiesOf"
import { Section } from "Utils/Section"

const props = {
  href: "/artist/francesca-dimattio",
  imageUrl: "https://picsum.photos/110/110/?random",
  name: "Francesca DiMattio",
  meta: "American, b. 1979",
}

storiesOf("Styleguide/Components", module)
  .addDecorator(story =&gt; {story()})
  .add("EntityHeader", () =&gt; {
    return (
      &lt;&gt;
        <section title="Default">
          
        </section>
        <section title="No image, initials">
          
        </section>
        <section title="No image, overflow initials"></section>
github artsy / reaction / src / Components / __stories__ / CollectionsRail.story.tsx View on Github external
import { Box, Theme } from "@artsy/palette"
import React from "react"
import { storiesOf } from "storybook/storiesOf"
import styled from "styled-components"

import { CollectionsRailContent } from "../CollectionsRail"

const RailsContainer = styled(Box)`
  max-width: 1250px;
`

storiesOf("Components/CollectionsRail", module).add(
  "Collections Rail Content",
  () =&gt; (
    
      
        
      
    
  )
)
github artsy / reaction / src / Apps / Artwork / Components / ArtworkSidebar / __stories__ / ArtworkSidebarCurrentBidInfo.story.tsx View on Github external
LiveAuctionInProgress,
  OpenAuctionNoReserveNoBids,
  OpenAuctionNoReserveWithBids,
  OpenAuctionReserveMetWithBids,
  OpenAuctionReserveMetWithMyLosingBid,
  OpenAuctionReserveMetWithMyWinningBid,
  OpenAuctionReserveNoBids,
  OpenAuctionReserveNotMetIncreasingOwnBid,
  OpenAuctionReserveNotMetWithBids,
} from "Apps/__tests__/Fixtures/Artwork/ArtworkSidebar/ArtworkSidebarCurrentBidInfo"
import { ArtworkSidebarCurrentBidInfo as CurrentBidInfo } from "Apps/Artwork/Components/ArtworkSidebar/ArtworkSidebarCurrentBidInfo"
import React from "react"
import { storiesOf } from "storybook/storiesOf"
import { Section } from "Utils/Section"

storiesOf("Apps/Artwork/Components/Sidebar", module).add(
  "CurrentBidInfo",
  () =&gt; {
    return (
      
        <section title="Closed auction">
          
        </section>
        <section title="Open auction no reserve no bids">
          
        </section>
        <section title="Open auction no reserve with bids">
          
        </section>
        <section title="Open auction with reserve and no bids">
          
        </section>
github artsy / reaction / src / Apps / __stories__ / OrderApp.story.tsx View on Github external
/&gt;
  ))
  .add("canceled (pickup)", () =&gt; (
    
  ))
  .add("refunded", () =&gt; (
    
  ))

storiesOf("Apps/Order/Make Offer/Offer", module).add("Empty", () =&gt; (
  
))

storiesOf("Apps/Order/Make Offer/Shipping", module)
  .add("Shipping - Pre-filled", () =&gt; (
    
  ))
github artsy / reaction / src / Components / v2 / __stories__ / CarouselV2.story.tsx View on Github external
import { Box, Image } from "@artsy/palette"
import { artworkBricks, images } from "Apps/__tests__/Fixtures/Carousel"
import { FillwidthItem } from "Components/Artwork/FillwidthItem"
import {
  Carousel,
  CarouselServer,
  LargeCarousel,
  SmallCarousel,
} from "Components/v2/CarouselV2"
import { RelayStubProvider } from "DevTools/RelayStubProvider"
import React from "react"
import { storiesOf } from "storybook/storiesOf"
import { Section } from "Utils/Section"

storiesOf("Styleguide/Components", module).add("CarouselV2", () =&gt; {
  return (
    
      <section title="Responsive Carousel">
        
           {
              return (
                <img height="{props.resized.height}" width="{props.resized.width}" src="{props.resized.url}">
              )
            }}</section>
github artsy / reaction / src / Styleguide / Components / __stories__ / Pagination.story.tsx View on Github external
import { paginationProps } from "Apps/__test__/Fixtures/Pagination"
import React from "react"
import { storiesOf } from "storybook/storiesOf"
import { Section } from "Styleguide/Utils/Section"
import { LargePagination, Pagination, SmallPagination } from "../Pagination"

storiesOf("Legacy/Styleguide/Components", module).add("Pagination", () =&gt; {
  const { cursor, callbacks } = paginationProps

  return (
    
      <section title="Responsive">
        
      </section>
      <section title="Large Pagination">
        
      </section>
      <section title="Small Pagination">
        
      </section>
    
  )
})
github artsy / reaction / src / Styleguide / Elements / __stories__ / Image.story.tsx View on Github external
import React from "react"
import { storiesOf } from "storybook/storiesOf"
import { Section } from "Styleguide/Utils/Section"
import { BorderBox } from "../Box"
import { Image, ResponsiveImage } from "../Image"

storiesOf("Legacy/Styleguide/Elements", module).add("Image", () =&gt; {
  return (
    
      <section title="Default Image">
        <img src="https://picsum.photos/110/110/?random">
      </section>
      <section title="Custom size">
        <img src="https://picsum.photos/300/300/?random" height="200px" width="300px">
      </section>
      <section title="Responsive Image">
        
          
        </section>
github artsy / reaction / src / Apps / Order / Components / __stories__ / ArtworkSummaryItem.story.tsx View on Github external
}
`

const render = (extraOrderProps?: Partial) =&gt; {
  return (
    
  )
}
storiesOf("Apps/Order/Components", module)
  .add("ArtworkSummaryItem", () =&gt; {
    return (
      <section title="Artwork Summary">
        
          {render()}
        
      </section>
    )
  })
  .add("ArtworkSummaryItem (with long titles)", () =&gt; (
    <section title="Artwork Summary">
      
        {render({
          lineItems: makeLineItems({
            artistName: "Francesca DiMattio and Orta Theroxicus",
            artworkTitle: "Some quite long title you know how artists can be",</section>
github artsy / reaction / src / Apps / __stories__ / OrderApp.story.tsx View on Github external
initialRoute="/orders/123/shipping"
    /&gt;
  ))

storiesOf("Apps/Order/Buy Now/Review", module).add("Review", () =&gt; (
  
))

storiesOf("Apps/Order/Buy Now/Payment", module)
  .add("With 'Ship'", () =&gt; (
    
  ))
  .add("With 'Pickup'", () =&gt; (
    
  ))

storiesOf("Apps/Order/Buy Now/Status", module)
  .add("submitted (ship)", () =&gt; (