chore: upgrade storybook 7.6.3 + use @storybook/nextjs (#12673)
* chore: upgrade storybook 7.6.3 + use @storybook/nextjs * fix: color picker tests
This commit is contained in:
1 parent
9a6d4e63e8
commit
80b92b5f11
13 files changed
+112
-83
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { TooltipProvider } from "@radix-ui/react-tooltip";
|
||||
import { Canvas, Meta, Story, ArgsTable } from "@storybook/addon-docs";
|
||||
|
||||
import {
|
||||
@@ -9,6 +10,7 @@ import {
|
||||
VariantColumn,
|
||||
RowTitles,
|
||||
CustomArgsTable,
|
||||
VariantRow,
|
||||
} from "@calcom/storybook/components";
|
||||
import { Icon } from "@calcom/ui";
|
||||
|
||||
@@ -20,31 +22,36 @@ import { mockEvent } from "./event.mock.ts";
|
||||
<Meta title="Features/Events/Meta" component={EventDetails} />
|
||||
|
||||
<Title title="Event Meta" suffix="Brief" subtitle="Version 2.0 — Last Update: 12 Dec 2022" />
|
||||
|
||||
<Examples title="Combined event meta block">
|
||||
<div style={{ maxWidth: 300 }}>
|
||||
<Example title="Event Title">
|
||||
<EventTitle event={mockEvent} />
|
||||
</Example>
|
||||
<Example title="Event Details">
|
||||
<EventDetails event={mockEvent} />
|
||||
</Example>
|
||||
</div>
|
||||
</Examples>
|
||||
<TooltipProvider>
|
||||
<Examples title="Combined event meta block">
|
||||
<div style={{ maxWidth: 300 }}>
|
||||
<Example title="Event Title">
|
||||
<EventTitle event={mockEvent} />
|
||||
</Example>
|
||||
<Example title="Event Details">
|
||||
<EventDetails event={mockEvent} />
|
||||
</Example>
|
||||
</div>
|
||||
</Examples>
|
||||
</TooltipProvider>
|
||||
|
||||
<Canvas>
|
||||
<Story name="All variants">
|
||||
<VariantsTable titles={["Event Meta Components"]} columnMinWidth={150}>
|
||||
<VariantRow variant="">
|
||||
<div style={{ maxWidth: 300 }}>
|
||||
<EventMembers
|
||||
users={[
|
||||
{ name: "Pro example", username: "pro" },
|
||||
{ name: "Team example", username: "team" },
|
||||
]}
|
||||
/>
|
||||
<EventTitle>Quick catch-up</EventTitle>
|
||||
<EventDetails event={mockEvent} />
|
||||
<TooltipProvider>
|
||||
<EventMembers
|
||||
entity={{ name: "entityName" }}
|
||||
profile={{ name: "profileName" }}
|
||||
users={[
|
||||
{ name: "Pro example", username: "pro" },
|
||||
{ name: "Team example", username: "team" },
|
||||
]}
|
||||
/>
|
||||
<EventTitle>Quick catch-up</EventTitle>
|
||||
<EventDetails event={mockEvent} />
|
||||
</TooltipProvider>
|
||||
</div>
|
||||
</VariantRow>
|
||||
</VariantsTable>
|
||||
|
||||
@@ -24,6 +24,11 @@ This component contains an input form to capture a 6-digit verification code, er
|
||||
<Canvas>
|
||||
<Story
|
||||
name="VerifyCodeDialog"
|
||||
parameters={{
|
||||
nextjs: {
|
||||
appDirectory: true,
|
||||
},
|
||||
}}
|
||||
args={{
|
||||
isOpenDialog: true,
|
||||
setIsOpenDialog: () => {},
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
import { Canvas, Meta, Story, ArgsTable } from "@storybook/addon-docs";
|
||||
import { Canvas, Meta, Story } from "@storybook/addon-docs";
|
||||
import { TooltipProvider } from "@radix-ui/react-tooltip";
|
||||
|
||||
import {
|
||||
Examples,
|
||||
Example,
|
||||
Note,
|
||||
|
||||
Title,
|
||||
CustomArgsTable,
|
||||
VariantsTable,
|
||||
VariantRow,
|
||||
} from "@calcom/storybook/components";
|
||||
|
||||
import { events, blockingDates } from "../_storybookData";
|
||||
import "../styles/styles.css";
|
||||
import { CalendarEvent } from "../types/events";
|
||||
import { Calendar } from "./Calendar";
|
||||
|
||||
<Meta title="UI/Calendar" component={Calendar} />
|
||||
@@ -29,7 +25,7 @@ The Args Table below shows you a breakdown of what props can be passed into the
|
||||
|
||||
There will be a few examples of how to use the Calendar component to show different usecases.
|
||||
|
||||
export const Template = (args) => <Calendar {...args} />;
|
||||
export const Template = (args) => <TooltipProvider><Calendar {...args} /></TooltipProvider>;
|
||||
|
||||
<Canvas>
|
||||
<Story
|
||||
@@ -74,6 +70,7 @@ export const Template = (args) => <Calendar {...args} />;
|
||||
},
|
||||
}}>
|
||||
{({ ...args }) => (
|
||||
<TooltipProvider>
|
||||
<Calendar
|
||||
{...args}
|
||||
events={events}
|
||||
@@ -81,6 +78,7 @@ export const Template = (args) => <Calendar {...args} />;
|
||||
onEmptyCellClick={(date) => alert(date.toString())}
|
||||
sortEvents
|
||||
/>
|
||||
</TooltipProvider>
|
||||
)}
|
||||
</Story>
|
||||
</Canvas>
|
||||
Reference in new issue
Block a user