Skip to content

Commit 6a9a37b

Browse files
committed
chore: swap in action callbacks
1 parent 087fe94 commit 6a9a37b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

site/src/pages/WorkspacesPage/BatchUpdateModalForm.stories.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Meta, Parameters, StoryObj } from "@storybook/react";
2-
import { expect, screen, userEvent, within } from "@storybook/test";
1+
import type { Meta, Parameters, StoryObj } from "@storybook/react-vite";
2+
import { expect, screen, userEvent, within } from "storybook/test";
33
import { templateVersionRoot } from "api/queries/templates";
44
import type {
55
TemplateVersion,
@@ -10,6 +10,7 @@ import { useQueryClient } from "react-query";
1010
import { MockTemplateVersion, MockWorkspace } from "testHelpers/entities";
1111
import { BatchUpdateModalForm } from "./BatchUpdateModalForm";
1212
import { ACTIVE_BUILD_STATUSES } from "./WorkspacesPage";
13+
import { action } from "storybook/internal/actions";
1314

1415
type Writeable<T> = { -readonly [Key in keyof T]: T[Key] };
1516
type MutableWorkspace = Writeable<Omit<Workspace, "latest_build">> & {
@@ -22,11 +23,8 @@ const meta: Meta<typeof BatchUpdateModalForm> = {
2223
args: {
2324
open: true,
2425
isProcessing: false,
25-
onSubmit: () => window.alert("Hooray! Everything has been submitted"),
26-
// Since we're using Radix, any cancel functionality is also going to
27-
// trigger when you click outside the component bounds, which would make
28-
// doing an alert really annoying in the Storybook web UI
29-
onCancel: () => console.log("Canceled"),
26+
onSubmit: action("All selected workspaces have been updated"),
27+
onCancel: action("Update canceled"),
3028
},
3129
};
3230

0 commit comments

Comments
 (0)