import React from "react";
import { Meta, StoryFn } from "@storybook/react";
import { NewsArticleTeaser, NewsArticleTeaserProps } from "./NewsArticleTeaser";

export default {
  title: "Molecules/News Article Teaser",
  component: NewsArticleTeaser,
  decorators: [
    (Story) => (
      <div style={{ maxWidth: 840, display: 'flex', flexDirection: "column", marginLeft: 120 }}>
        {/* 👇 Decorators in Storybook also accept a function. Replace <Story/> with Story() to enable it  */}
        <Story />
      </div>
    ),
  ]
} as Meta;

const Template: StoryFn<NewsArticleTeaserProps> = (args) => (
  <NewsArticleTeaser {...args} />
);

export const Preview = Template.bind({});
Preview.args = {
  thumbnail: "https://picsum.photos/259/236",
  title: "A practitioner’s guide to starting your own practice: what you need to know",
  description: "I’ve mentioned before that I do mentoring and consulting for Health Practitioners. Sometimes they send me links to their clinic direct wwww",
  tags: ["Stethoscope"],
  author: "Olivia Rhye",
  articledate: "2023-11-20T00:00:00+11:00"
};
