import { Meta } from "@storybook/react" import React from "react" import { useMeCustomer, useCustomerOrders } from "../src" import Layout from "./components/Layout" const CustomerOrders = ({ showHookData, id }) => { const data = useCustomerOrders(id) return (

Customer Orders

) } const Customer = ({ showHookData }) => { const data = useMeCustomer() return (

Customer:

{data?.customer?.first_name} {data?.customer?.last_name} -{" "} {data?.customer?.email}
) } const meta: Meta = { title: "Customers", argTypes: { showHookData: { name: "Show hook data", description: "Whether or not story should display JSON of data returned from hook", control: { type: "boolean", }, defaultValue: true, }, }, parameters: { controls: { expanded: true }, }, } export default meta export const ListOrders = (args: { showHookData: boolean; id: string }) => ( ) ListOrders.argTypes = { id: { control: { type: "text", }, name: "customer id", defaultValue: "reg_", }, } export const GetOne = (args: { showHookData: boolean }) => ( )