All files / components/ArticleSummary ArticleSummary.stories.js

0% Statements 0/17
100% Branches 0/0
0% Functions 0/2
0% Lines 0/17

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106                                                                                                                                                                                                                   
// @flow
 
import ArticleSummary, { type ComponentProps } from "components/ArticleSummary"
import { MemoryRouter } from "react-router-dom"
import React from "react"
import mediaQueries from "styles/mediaQueries"
import styled from "styled-components"
 
const stories = {
  argTypes: {
    listType: { table: { disable: true } }
  },
  component: ArticleSummary,
  decorators: [
    (Story: React$AbstractComponent<*, *>) => (
      <MemoryRouter>
        <Story />
      </MemoryRouter>
    )
  ],
  parameters: { layout: "fullscreen" },
  title: "Components/ArticleSummary"
}
 
const Wrapper = styled.div`
  width: 100%;
 
  ${mediaQueries.desktop} {
    width: 300px;
  }
`
 
const Template = (args: ComponentProps) => (
  <Wrapper>
    <ArticleSummary {...args} />
  </Wrapper>
)
 
export const DesktopOne = Template.bind({})
DesktopOne.args = {
  image: null,
  link: "/news/microsoft-will-windows-einen-neuen-frischen-look-verpassen",
  listType: "DESKTOP_ONE",
  subtitle:
    "Im neuen Jahr möchte der Konzern eine neue Windows-Version launchen.",
  theme: "aktienNews",
  title: 'Microsoft will Windows einen neuen "frischen" Look verpassen'
}
 
export const DesktopTwo = Template.bind({})
DesktopTwo.args = {
  image: null,
  link: "/news/microsoft-will-windows-einen-neuen-frischen-look-verpassen",
  listType: "DESKTOP_TWO",
  subtitle:
    "Im neuen Jahr möchte der Konzern eine neue Windows-Version launchen.",
  theme: "aktienNews",
  title: 'Microsoft will Windows einen neuen "frischen" Look verpassen'
}
 
export const DesktopThree = Template.bind({})
DesktopThree.args = {
  image: null,
  link: "/news/microsoft-will-windows-einen-neuen-frischen-look-verpassen",
  listType: "DESKTOP_THREE",
  subtitle:
    "Im neuen Jahr möchte der Konzern eine neue Windows-Version launchen.",
  theme: "aktienNews",
  title: 'Microsoft will Windows einen neuen "frischen" Look verpassen'
}
 
export const Hero = Template.bind({})
Hero.args = {
  image: null,
  link: "/news/microsoft-will-windows-einen-neuen-frischen-look-verpassen",
  listType: "HERO",
  subtitle:
    "Im neuen Jahr möchte der Konzern eine neue Windows-Version launchen.",
  theme: "aktienNews",
  title: 'Microsoft will Windows einen neuen "frischen" Look verpassen'
}
 
export const Other = Template.bind({})
Other.args = {
  image:
    "https://cms.dot-news.de/sites/default/files/2021-01/shutterstock_1664595730-esports.jpg",
  link: "/news/microsoft-will-windows-einen-neuen-frischen-look-verpassen",
  listType: "OTHER",
  subtitle: "22 May 2021",
  theme: "aktienNews",
  title: 'Microsoft will Windows einen neuen "frischen" Look verpassen'
}
 
export const Popular = Template.bind({})
Popular.args = {
  image: null,
  link: "/news/microsoft-will-windows-einen-neuen-frischen-look-verpassen",
  listType: "POPULAR",
  subtitle:
    "Im neuen Jahr möchte der Konzern eine neue Windows-Version launchen.",
  theme: "aktienNews",
  title: 'Microsoft will Windows einen neuen "frischen" Look verpassen'
}
 
export default stories