import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport"; import type { Meta, StoryObj } from "@storybook/react"; import { useState } from "react"; import { ThemeProviderDecorators } from "@/storybook/Decorator"; import { FlightBrand, FlightCard, FlightDetail, FlightDetailAction, FlightDetailCard, FlightInformation, FlightPrice, FlightTime, } from "./flight-card"; const meta = { title: "Widgets/FligtCard", component: FlightCard, tags: ["autodocs"], decorators: ThemeProviderDecorators, parameters: { // 👇 The viewports object from the Essentials addon viewport: { // 👇 The viewports you want to use viewports: INITIAL_VIEWPORTS, // 👇 Your own default viewport }, }, } satisfies Meta; export default meta; type Story = StoryObj; const properties = [ { text: "1 Parça Kabin Bagajı", }, { text: "1 Parça Kabin Bagajı", }, { text: "1 Parça Kabin Bagajı", }, { text: "1 Parça Kabin Bagajı", }, { text: "1 Parça Kabin Bagajı", }, ]; export const DefaultFlightCard: Story = { render: () => { // eslint-disable-next-line react-hooks/rules-of-hooks const [showDetail, SetShowDetail] = useState(false); return (
SetShowDetail(!showDetail)} isOpen={showDetail} /> {Array.from({ length: 5 }).map((_, i) => ( ))}
); }, };