jsx import { jsx } from "@emotion/core" ; import { Story , Meta } from "@storybook/react/types-6-0" ; import { MemoryRouter } from "react-router-dom" ; import { QnaPostItem , QnaPostItemProps , } from "../../components/qna/QnaPostItem" ; import { generatePosts } from "./generator" ; export default { title : "qna/QnaPostItem" , component : QnaPostItem , } as Meta ; const Template = ( args ) => ( < MemoryRouter > < QnaPostItem { ... args } / > < /MemoryRouter>); export const Default = Template . bind ( { } ) ; Default . args = { post : generatePosts ( 1 ) [ 0 ] , } ;