mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: reorganize storybook (#10144)
This commit is contained in:
@@ -9,7 +9,7 @@ const mockError = mockApiError({
|
||||
});
|
||||
|
||||
const meta: Meta<typeof ErrorAlert> = {
|
||||
title: "components/ErrorAlert",
|
||||
title: "components/Alert/ErrorAlert",
|
||||
component: ErrorAlert,
|
||||
args: {
|
||||
error: mockError,
|
||||
|
||||
@@ -13,4 +13,6 @@ const meta: Meta<typeof UserDropdown> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof UserDropdown>;
|
||||
|
||||
export const Example: Story = {};
|
||||
const Example: Story = {};
|
||||
|
||||
export { Example as UserDropdown };
|
||||
|
||||
@@ -18,4 +18,6 @@ const meta: Meta<typeof DeleteDialog> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof DeleteDialog>;
|
||||
|
||||
export const Example: Story = {};
|
||||
const Example: Story = {};
|
||||
|
||||
export { Example as DeleteDialog };
|
||||
|
||||
@@ -13,9 +13,11 @@ const meta: Meta<typeof EmptyState> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof EmptyState>;
|
||||
|
||||
export const Example: Story = {
|
||||
const Example: Story = {
|
||||
args: {
|
||||
description: "It is easy, just click the button below",
|
||||
cta: <Button>Create workspace</Button>,
|
||||
},
|
||||
};
|
||||
|
||||
export { Example as EmptyState };
|
||||
|
||||
@@ -29,9 +29,11 @@ const meta: Meta<typeof FullPageForm> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof FullPageForm>;
|
||||
|
||||
export const Example: Story = {
|
||||
const Example: Story = {
|
||||
args: {
|
||||
title: "My Form",
|
||||
detail: "Lorem ipsum dolor",
|
||||
},
|
||||
};
|
||||
|
||||
export { Example as FullPageForm };
|
||||
|
||||
@@ -9,9 +9,11 @@ const meta: Meta<typeof GroupAvatar> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof GroupAvatar>;
|
||||
|
||||
export const Example: Story = {
|
||||
const Example: Story = {
|
||||
args: {
|
||||
name: "My Group",
|
||||
avatarURL: "",
|
||||
},
|
||||
};
|
||||
|
||||
export { Example as GroupAvatar };
|
||||
|
||||
@@ -33,4 +33,6 @@ const meta: Meta<typeof HelpTooltip> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof HelpTooltip>;
|
||||
|
||||
export const Example: Story = {};
|
||||
const Example: Story = {};
|
||||
|
||||
export { Example as HelpTooltip };
|
||||
|
||||
@@ -9,7 +9,7 @@ const meta: Meta<typeof Margins> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof Margins>;
|
||||
|
||||
export const Example: Story = {
|
||||
const Example: Story = {
|
||||
args: {
|
||||
children: (
|
||||
<div style={{ width: "100%", background: "black" }}>
|
||||
@@ -18,3 +18,5 @@ export const Example: Story = {
|
||||
),
|
||||
},
|
||||
};
|
||||
|
||||
export { Example as Margins };
|
||||
|
||||
@@ -31,4 +31,6 @@ const meta: Meta<typeof OverflowY> = {
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<typeof OverflowY>;
|
||||
export const Example: Story = {};
|
||||
const Example: Story = {};
|
||||
|
||||
export { Example as OverflowY };
|
||||
|
||||
@@ -20,4 +20,6 @@ const meta: Meta<typeof PopoverContainer> = {
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<typeof PopoverContainer>;
|
||||
export const Example: Story = {};
|
||||
const Example: Story = {};
|
||||
|
||||
export { Example as PopoverContainer };
|
||||
|
||||
@@ -28,7 +28,7 @@ const descriptionDefaults: WorkspaceAgentMetadataDescription = {
|
||||
script: "some command",
|
||||
};
|
||||
|
||||
export const Example: Story = {
|
||||
const Example: Story = {
|
||||
args: {
|
||||
metadata: [
|
||||
{
|
||||
@@ -105,3 +105,5 @@ export const Example: Story = {
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
export { Example as AgentMetadata };
|
||||
|
||||
@@ -10,8 +10,10 @@ const meta: Meta<typeof TerminalLink> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof TerminalLink>;
|
||||
|
||||
export const Example: Story = {
|
||||
const Example: Story = {
|
||||
args: {
|
||||
workspaceName: MockWorkspace.name,
|
||||
},
|
||||
};
|
||||
|
||||
export { Example as TerminalLink };
|
||||
|
||||
@@ -9,7 +9,7 @@ const meta: Meta<typeof TableRowMenu> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof TableRowMenu<{ id: string }>>;
|
||||
|
||||
export const Example: Story = {
|
||||
const Example: Story = {
|
||||
args: {
|
||||
data: { id: "123" },
|
||||
menuItems: [
|
||||
@@ -20,3 +20,5 @@ export const Example: Story = {
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
export { Example as TableRowMenu };
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import {
|
||||
} from "testHelpers/entities";
|
||||
|
||||
const meta: Meta<typeof AuditLogDescription> = {
|
||||
title: "components/AuditLogDescription",
|
||||
title: "pages/AuditPage/AuditLogDescription",
|
||||
component: AuditLogDescription,
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import { AuditLogRow } from "./AuditLogRow";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof AuditLogRow> = {
|
||||
title: "components/AuditLogRow",
|
||||
title: "pages/AuditPage/AuditLogRow",
|
||||
component: AuditLogRow,
|
||||
decorators: [
|
||||
(Story) => (
|
||||
|
||||
@@ -24,7 +24,7 @@ const defaultFilterProps = getDefaultFilterProps<FilterProps>({
|
||||
});
|
||||
|
||||
const meta: Meta<typeof AuditPageView> = {
|
||||
title: "pages/AuditPageView",
|
||||
title: "pages/AuditPage",
|
||||
component: AuditPageView,
|
||||
args: {
|
||||
auditLogs: [MockAuditLog, MockAuditLog2],
|
||||
|
||||
@@ -2,7 +2,7 @@ import { CliAuthPageView } from "./CliAuthPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof CliAuthPageView> = {
|
||||
title: "pages/CliAuthPageView",
|
||||
title: "pages/CliAuthPage",
|
||||
component: CliAuthPageView,
|
||||
args: {
|
||||
sessionToken: "some-session-token",
|
||||
@@ -12,4 +12,6 @@ const meta: Meta<typeof CliAuthPageView> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof CliAuthPageView>;
|
||||
|
||||
export const Example: Story = {};
|
||||
const Example: Story = {};
|
||||
|
||||
export { Example as CliAuthPage };
|
||||
|
||||
@@ -11,7 +11,7 @@ import { CreateTemplateForm } from "./CreateTemplateForm";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof CreateTemplateForm> = {
|
||||
title: "components/CreateTemplateForm",
|
||||
title: "pages/CreateTemplatePage",
|
||||
component: CreateTemplateForm,
|
||||
args: {
|
||||
isSubmitting: false,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { CreateUserForm } from "./CreateUserForm";
|
||||
import { mockApiError } from "testHelpers/entities";
|
||||
|
||||
const meta: Meta<typeof CreateUserForm> = {
|
||||
title: "components/CreateUserForm",
|
||||
title: "pages/CreateUserPage",
|
||||
component: CreateUserForm,
|
||||
args: {
|
||||
onCancel: action("cancel"),
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
import { CreateWorkspacePageView } from "./CreateWorkspacePageView";
|
||||
|
||||
const meta: Meta<typeof CreateWorkspacePageView> = {
|
||||
title: "pages/CreateWorkspacePageView",
|
||||
title: "pages/CreateWorkspacePage",
|
||||
component: CreateWorkspacePageView,
|
||||
args: {
|
||||
defaultName: "",
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ExternalAuth } from "./ExternalAuth";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof ExternalAuth> = {
|
||||
title: "components/ExternalAuth",
|
||||
title: "pages/CreateWorkspacePage/ExternalAuth",
|
||||
component: ExternalAuth,
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { SelectedTemplate } from "./SelectedTemplate";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof SelectedTemplate> = {
|
||||
title: "components/SelectedTemplate",
|
||||
title: "pages/CreateWorkspacePage/SelectedTemplate",
|
||||
component: SelectedTemplate,
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { AppearanceSettingsPageView } from "./AppearanceSettingsPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof AppearanceSettingsPageView> = {
|
||||
title: "pages/AppearanceSettingsPageView",
|
||||
title: "pages/DeploySettingsPage/AppearanceSettingsPageView",
|
||||
component: AppearanceSettingsPageView,
|
||||
args: {
|
||||
appearance: {
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { ExternalAuthSettingsPageView } from "./ExternalAuthSettingsPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof ExternalAuthSettingsPageView> = {
|
||||
title: "pages/ExternalAuthSettingsPageView",
|
||||
title: "pages/DeploySettingsPage/ExternalAuthSettingsPageView",
|
||||
component: ExternalAuthSettingsPageView,
|
||||
args: {
|
||||
config: {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import {
|
||||
import { GeneralSettingsPageView } from "./GeneralSettingsPageView";
|
||||
|
||||
const meta: Meta<typeof GeneralSettingsPageView> = {
|
||||
title: "pages/GeneralSettingsPageView",
|
||||
title: "pages/DeploySettingsPage/GeneralSettingsPageView",
|
||||
component: GeneralSettingsPageView,
|
||||
args: {
|
||||
deploymentOptions: [
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { AddNewLicensePageView } from "./AddNewLicensePageView";
|
||||
|
||||
export default {
|
||||
title: "pages/AddNewLicensePageView",
|
||||
title: "pages/DeploySettingsPage/AddNewLicensePageView",
|
||||
component: AddNewLicensePageView,
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import LicensesSettingsPageView from "./LicensesSettingsPageView";
|
||||
import { MockLicenseResponse } from "testHelpers/entities";
|
||||
|
||||
export default {
|
||||
title: "pages/LicensesSettingsPageView",
|
||||
title: "pages/DeploySettingsPage/LicensesSettingsPageView",
|
||||
component: LicensesSettingsPageView,
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ const group: ClibaseGroup = {
|
||||
};
|
||||
|
||||
const meta: Meta<typeof NetworkSettingsPageView> = {
|
||||
title: "pages/NetworkSettingsPageView",
|
||||
title: "pages/DeploySettingsPage/NetworkSettingsPageView",
|
||||
component: NetworkSettingsPageView,
|
||||
args: {
|
||||
options: [
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ const group: ClibaseGroup = {
|
||||
};
|
||||
|
||||
const meta: Meta<typeof SecuritySettingsPageView> = {
|
||||
title: "pages/SecuritySettingsPageView",
|
||||
title: "pages/DeploySettingsPage/SecuritySettingsPageView",
|
||||
component: SecuritySettingsPageView,
|
||||
args: {
|
||||
options: [
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ const ghGroup: ClibaseGroup = {
|
||||
};
|
||||
|
||||
const meta: Meta<typeof UserAuthSettingsPageView> = {
|
||||
title: "pages/UserAuthSettingsPageView",
|
||||
title: "pages/DeploySettingsPage/UserAuthSettingsPageView",
|
||||
component: UserAuthSettingsPageView,
|
||||
args: {
|
||||
options: [
|
||||
|
||||
@@ -4,7 +4,7 @@ import ExternalAuthPageView, {
|
||||
} from "./ExternalAuthPageView";
|
||||
|
||||
export default {
|
||||
title: "pages/ExternalAuthPageView",
|
||||
title: "pages/ExternalAuthPage",
|
||||
component: ExternalAuthPageView,
|
||||
} as Meta<typeof ExternalAuthPageView>;
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@ import { CreateGroupPageView } from "./CreateGroupPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof CreateGroupPageView> = {
|
||||
title: "pages/CreateGroupPageView",
|
||||
title: "pages/GroupsPage/CreateGroupPageView",
|
||||
component: CreateGroupPageView,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof CreateGroupPageView>;
|
||||
|
||||
export const Example: Story = {};
|
||||
const Example: Story = {};
|
||||
|
||||
export { Example as CreateGroupPageView };
|
||||
|
||||
@@ -3,7 +3,7 @@ import { GroupsPageView } from "./GroupsPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof GroupsPageView> = {
|
||||
title: "pages/GroupsPageView",
|
||||
title: "pages/GroupsPage",
|
||||
component: GroupsPageView,
|
||||
};
|
||||
|
||||
|
||||
@@ -3,16 +3,18 @@ import { SettingsGroupPageView } from "./SettingsGroupPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof SettingsGroupPageView> = {
|
||||
title: "pages/SettingsGroupPageView",
|
||||
title: "pages/GroupsPage/SettingsGroupPageView",
|
||||
component: SettingsGroupPageView,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof SettingsGroupPageView>;
|
||||
|
||||
export const Example: Story = {
|
||||
const Example: Story = {
|
||||
args: {
|
||||
group: MockGroup,
|
||||
isLoading: false,
|
||||
},
|
||||
};
|
||||
|
||||
export { Example as SettingsGroupPageView };
|
||||
|
||||
@@ -3,7 +3,7 @@ import { HealthPageView } from "./HealthPage";
|
||||
import { MockHealth } from "testHelpers/entities";
|
||||
|
||||
const meta: Meta<typeof HealthPageView> = {
|
||||
title: "pages/HealthPageView",
|
||||
title: "pages/HealthPage",
|
||||
component: HealthPageView,
|
||||
args: {
|
||||
tab: {
|
||||
@@ -17,9 +17,9 @@ const meta: Meta<typeof HealthPageView> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof HealthPageView>;
|
||||
|
||||
export const HealthPage: Story = {};
|
||||
export const Example: Story = {};
|
||||
|
||||
export const UnhealthPage: Story = {
|
||||
export const UnhealthyDERP: Story = {
|
||||
args: {
|
||||
healthStatus: {
|
||||
...MockHealth,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { LoginPageView } from "./LoginPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof LoginPageView> = {
|
||||
title: "pages/LoginPageView",
|
||||
title: "pages/LoginPage",
|
||||
component: LoginPageView,
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { SignInForm } from "./SignInForm";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof SignInForm> = {
|
||||
title: "components/SignInForm",
|
||||
title: "pages/LoginPage/SignInForm",
|
||||
component: SignInForm,
|
||||
args: {
|
||||
isSigningIn: false,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { mockApiError } from "testHelpers/entities";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof SetupPageView> = {
|
||||
title: "pages/SetupPageView",
|
||||
title: "pages/SetupPage",
|
||||
component: SetupPageView,
|
||||
};
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@ import { StarterTemplatePageView } from "./StarterTemplatePageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof StarterTemplatePageView> = {
|
||||
title: "pages/StarterTemplatePageView",
|
||||
title: "pages/StarterTemplatePage",
|
||||
component: StarterTemplatePageView,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof StarterTemplatePageView>;
|
||||
|
||||
export const Default: Story = {
|
||||
export const Example: Story = {
|
||||
args: {
|
||||
error: undefined,
|
||||
starterTemplate: MockTemplateExample,
|
||||
|
||||
@@ -8,14 +8,14 @@ import { StarterTemplatesPageView } from "./StarterTemplatesPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof StarterTemplatesPageView> = {
|
||||
title: "pages/StarterTemplatesPageView",
|
||||
title: "pages/StarterTemplatesPage",
|
||||
component: StarterTemplatesPageView,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof StarterTemplatesPageView>;
|
||||
|
||||
export const Default: Story = {
|
||||
export const Example: Story = {
|
||||
args: {
|
||||
error: undefined,
|
||||
starterTemplatesByTag: getTemplatesByTag([
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from "testHelpers/entities";
|
||||
|
||||
const meta: Meta<typeof TemplateEmbedPageView> = {
|
||||
title: "pages/TemplateEmbedPageView",
|
||||
title: "pages/TemplatePage/TemplateEmbedPageView",
|
||||
component: TemplateEmbedPageView,
|
||||
args: {
|
||||
template: MockTemplate,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { TemplateInsightsPageView } from "./TemplateInsightsPage";
|
||||
import { MockEntitlementsWithUserLimit } from "testHelpers/entities";
|
||||
|
||||
const meta: Meta<typeof TemplateInsightsPageView> = {
|
||||
title: "pages/TemplateInsightsPageView",
|
||||
title: "pages/TemplatePage/TemplateInsightsPageView",
|
||||
component: TemplateInsightsPageView,
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { TemplateStats } from "./TemplateStats";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof TemplateStats> = {
|
||||
title: "components/TemplateStats",
|
||||
title: "pages/TemplatePage/TemplateStats",
|
||||
component: TemplateStats,
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import { TemplateSummaryPageView } from "./TemplateSummaryPageView";
|
||||
|
||||
const meta: Meta<typeof TemplateSummaryPageView> = {
|
||||
title: "pages/TemplateSummaryPageView",
|
||||
title: "pages/TemplatePage/TemplateSummaryPageView",
|
||||
component: TemplateSummaryPageView,
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import { TemplateSettingsPageView } from "./TemplateSettingsPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof TemplateSettingsPageView> = {
|
||||
title: "pages/TemplateSettingsPageView",
|
||||
title: "pages/TemplateSettingsPage",
|
||||
component: TemplateSettingsPageView,
|
||||
args: {
|
||||
template: MockTemplate,
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { TemplatePermissionsPageView } from "./TemplatePermissionsPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof TemplatePermissionsPageView> = {
|
||||
title: "pages/TemplatePermissionsPageView",
|
||||
title: "pages/TemplateSettingsPage/TemplatePermissionsPageView",
|
||||
component: TemplatePermissionsPageView,
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ const queryClient = new QueryClient({
|
||||
});
|
||||
|
||||
const meta: Meta<typeof TemplateSchedulePageView> = {
|
||||
title: "pages/TemplateSchedulePageView",
|
||||
title: "pages/TemplateSettingsPage/TemplateSchedulePageView",
|
||||
component: TemplateSchedulePageView,
|
||||
decorators: [
|
||||
(Story) => (
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import { TemplateVariablesPageView } from "./TemplateVariablesPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof TemplateVariablesPageView> = {
|
||||
title: "pages/TemplateVariablesPageView",
|
||||
title: "pages/TemplateSettingsPage/TemplateVariablesPageView",
|
||||
component: TemplateVariablesPageView,
|
||||
};
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import { TemplateVersionEditor } from "./TemplateVersionEditor";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof TemplateVersionEditor> = {
|
||||
title: "pages/TemplateVersionEditor",
|
||||
title: "pages/TemplateVersionEditorPage",
|
||||
component: TemplateVersionEditor,
|
||||
args: {
|
||||
template: MockTemplate,
|
||||
|
||||
@@ -47,7 +47,7 @@ const defaultArgs: TemplateVersionPageViewProps = {
|
||||
};
|
||||
|
||||
const meta: Meta<typeof TemplateVersionPageView> = {
|
||||
title: "pages/TemplateVersionPageView",
|
||||
title: "pages/TemplateVersionPage",
|
||||
component: TemplateVersionPageView,
|
||||
args: defaultArgs,
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@ import { TemplatesPageView } from "./TemplatesPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof TemplatesPageView> = {
|
||||
title: "pages/TemplatesPageView",
|
||||
title: "pages/TemplatesPage",
|
||||
component: TemplatesPageView,
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { AccountForm } from "./AccountForm";
|
||||
import { mockApiError } from "testHelpers/entities";
|
||||
|
||||
const meta: Meta<typeof AccountForm> = {
|
||||
title: "components/AccountForm",
|
||||
title: "pages/UserSettingsPage/AccountForm",
|
||||
component: AccountForm,
|
||||
args: {
|
||||
email: "test-user@org.com",
|
||||
|
||||
@@ -3,7 +3,7 @@ import { SSHKeysPageView } from "./SSHKeysPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof SSHKeysPageView> = {
|
||||
title: "pages/SSHKeysPageView",
|
||||
title: "pages/UserSettingsPage/SSHKeysPageView",
|
||||
component: SSHKeysPageView,
|
||||
args: {
|
||||
isLoading: false,
|
||||
|
||||
@@ -34,7 +34,7 @@ const defaultArgs: ComponentProps<typeof SecurityPageView> = {
|
||||
};
|
||||
|
||||
const meta: Meta<typeof SecurityPageView> = {
|
||||
title: "pages/SecurityPageView",
|
||||
title: "pages/UserSettingsPage/SecurityPageView",
|
||||
component: SecurityPageView,
|
||||
args: defaultArgs,
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ import { SecurityForm } from "./SettingsSecurityForm";
|
||||
import { mockApiError } from "testHelpers/entities";
|
||||
|
||||
const meta: Meta<typeof SecurityForm> = {
|
||||
title: "components/SecurityForm",
|
||||
title: "pages/UserSettingsPage/SecurityForm",
|
||||
component: SecurityForm,
|
||||
args: {
|
||||
isLoading: false,
|
||||
|
||||
@@ -14,7 +14,7 @@ const queryClient = new QueryClient({
|
||||
});
|
||||
|
||||
const meta: Meta<typeof ConfirmDeleteDialog> = {
|
||||
title: "components/ConfirmDeleteDialog",
|
||||
title: "pages/UserSettingsPage/TokensDeleteDialog",
|
||||
component: ConfirmDeleteDialog,
|
||||
decorators: [
|
||||
(Story) => (
|
||||
|
||||
@@ -3,7 +3,7 @@ import { TokensPageView } from "./TokensPageView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof TokensPageView> = {
|
||||
title: "pages/TokensPageView",
|
||||
title: "pages/UserSettingsPage/TokensPageView",
|
||||
component: TokensPageView,
|
||||
args: {
|
||||
isLoading: false,
|
||||
|
||||
@@ -9,7 +9,7 @@ import { WorkspaceProxyView } from "./WorkspaceProxyView";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof WorkspaceProxyView> = {
|
||||
title: "components/WorkspaceProxyView",
|
||||
title: "pages/UserSettingsPage/WorkspaceProxyView",
|
||||
component: WorkspaceProxyView,
|
||||
};
|
||||
|
||||
|
||||
@@ -4,17 +4,19 @@ import { MockUser } from "testHelpers/entities";
|
||||
import { ResetPasswordDialog } from "./ResetPasswordDialog";
|
||||
|
||||
const meta: Meta<typeof ResetPasswordDialog> = {
|
||||
title: "components/Dialogs/ResetPasswordDialog",
|
||||
title: "pages/UsersPage/ResetPasswordDialog",
|
||||
component: ResetPasswordDialog,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof ResetPasswordDialog>;
|
||||
|
||||
export const Example: Story = {
|
||||
const Example: Story = {
|
||||
args: {
|
||||
open: true,
|
||||
user: MockUser,
|
||||
newPassword: "somerandomstringhere",
|
||||
},
|
||||
};
|
||||
|
||||
export { Example as ResetPasswordDialog };
|
||||
|
||||
@@ -26,7 +26,7 @@ const defaultFilterProps = getDefaultFilterProps<FilterProps>({
|
||||
});
|
||||
|
||||
const meta: Meta<typeof UsersPageView> = {
|
||||
title: "pages/UsersPageView",
|
||||
title: "pages/UsersPage",
|
||||
component: UsersPageView,
|
||||
args: {
|
||||
page: 1,
|
||||
|
||||
@@ -7,7 +7,7 @@ import { EditRolesButton } from "./EditRolesButton";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof EditRolesButton> = {
|
||||
title: "components/EditRolesButton",
|
||||
title: "pages/UsersPage/EditRolesButton",
|
||||
component: EditRolesButton,
|
||||
args: {
|
||||
defaultIsOpen: true,
|
||||
|
||||
@@ -8,7 +8,7 @@ import { UsersTable } from "./UsersTable";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
const meta: Meta<typeof UsersTable> = {
|
||||
title: "components/UsersTable",
|
||||
title: "pages/UsersPage/UsersTable",
|
||||
component: UsersTable,
|
||||
args: {
|
||||
isNonInitialPage: false,
|
||||
|
||||
@@ -13,7 +13,7 @@ const defaultBuilds = Array.from({ length: 15 }, (_, i) => ({
|
||||
}));
|
||||
|
||||
const meta: Meta<typeof WorkspaceBuildPageView> = {
|
||||
title: "pages/WorkspaceBuildPageView",
|
||||
title: "pages/WorkspaceBuildPage",
|
||||
component: WorkspaceBuildPageView,
|
||||
args: {
|
||||
build: MockWorkspaceBuild,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { MockBuilds } from "testHelpers/entities";
|
||||
import { BuildsTable } from "./BuildsTable";
|
||||
|
||||
const meta: Meta<typeof BuildsTable> = {
|
||||
title: "components/BuildsTable",
|
||||
title: "pages/WorkspacePage/BuildsTable",
|
||||
component: BuildsTable,
|
||||
};
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ const MockedAppearance = {
|
||||
};
|
||||
|
||||
const meta: Meta<typeof Workspace> = {
|
||||
title: "components/Workspace",
|
||||
title: "pages/WorkspacePage/Workspace",
|
||||
component: Workspace,
|
||||
decorators: [
|
||||
(Story) => (
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as Mocks from "testHelpers/entities";
|
||||
import { WorkspaceActions } from "./WorkspaceActions";
|
||||
|
||||
const meta: Meta<typeof WorkspaceActions> = {
|
||||
title: "components/WorkspaceActions",
|
||||
title: "pages/WorkspacePage/WorkspaceActions",
|
||||
component: WorkspaceActions,
|
||||
args: {
|
||||
isUpdating: false,
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
import { WorkspaceBuildProgress } from "./WorkspaceBuildProgress";
|
||||
|
||||
const meta: Meta<typeof WorkspaceBuildProgress> = {
|
||||
title: "components/WorkspaceBuildProgress",
|
||||
title: "pages/WorkspacePage/WorkspaceBuildProgress",
|
||||
component: WorkspaceBuildProgress,
|
||||
args: {
|
||||
transitionStats: {
|
||||
|
||||
@@ -2,11 +2,13 @@ import { Meta, StoryObj } from "@storybook/react";
|
||||
import { WorkspaceDeletedBanner } from "./WorkspaceDeletedBanner";
|
||||
|
||||
const meta: Meta<typeof WorkspaceDeletedBanner> = {
|
||||
title: "components/WorkspaceDeletedBanner",
|
||||
title: "pages/WorkspacePage/WorkspaceDeletedBanner",
|
||||
component: WorkspaceDeletedBanner,
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof WorkspaceDeletedBanner>;
|
||||
|
||||
export const Example: Story = {};
|
||||
const Example: Story = {};
|
||||
|
||||
export { Example as WorkspaceDeletedBanner };
|
||||
|
||||
@@ -16,7 +16,7 @@ const MockedAppearance = {
|
||||
};
|
||||
|
||||
const meta: Meta<typeof WorkspaceStats> = {
|
||||
title: "components/WorkspaceStats",
|
||||
title: "pages/WorkspacePage/WorkspaceStats",
|
||||
component: WorkspaceStats,
|
||||
decorators: [
|
||||
(Story) => (
|
||||
|
||||
+4
-2
@@ -10,7 +10,7 @@ import {
|
||||
} from "testHelpers/entities";
|
||||
|
||||
const meta: Meta<typeof WorkspaceParametersPageView> = {
|
||||
title: "pages/WorkspaceParametersPageView",
|
||||
title: "pages/WorkspaceSettingsPage/WorkspaceParametersPageView",
|
||||
component: WorkspaceParametersPageView,
|
||||
args: {
|
||||
submitError: undefined,
|
||||
@@ -37,4 +37,6 @@ const meta: Meta<typeof WorkspaceParametersPageView> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof WorkspaceParametersPageView>;
|
||||
|
||||
export const Example: Story = {};
|
||||
const Example: Story = {};
|
||||
|
||||
export { Example as WorkspaceParametersPage };
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ dayjs.extend(utc);
|
||||
dayjs.extend(timezone);
|
||||
|
||||
const meta: Meta<typeof WorkspaceScheduleForm> = {
|
||||
title: "components/WorkspaceScheduleForm",
|
||||
title: "pages/WorkspaceSettingsPage/WorkspaceScheduleForm",
|
||||
component: WorkspaceScheduleForm,
|
||||
args: {
|
||||
enableAutoStart: true,
|
||||
|
||||
@@ -3,7 +3,7 @@ import { MockWorkspace } from "testHelpers/entities";
|
||||
import { WorkspaceSettingsPageView } from "./WorkspaceSettingsPageView";
|
||||
|
||||
const meta: Meta<typeof WorkspaceSettingsPageView> = {
|
||||
title: "pages/WorkspaceSettingsPageView",
|
||||
title: "pages/WorkspaceSettingsPage/WorkspaceSettingsPageView",
|
||||
component: WorkspaceSettingsPageView,
|
||||
args: {
|
||||
error: undefined,
|
||||
@@ -15,4 +15,6 @@ const meta: Meta<typeof WorkspaceSettingsPageView> = {
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof WorkspaceSettingsPageView>;
|
||||
|
||||
export const Example: Story = {};
|
||||
const Example: Story = {};
|
||||
|
||||
export { Example as WorkspaceSettingsPageView };
|
||||
|
||||
Reference in New Issue
Block a user