mirror of https://github.com/coder/coder.git
30 lines
782 B
TypeScript
30 lines
782 B
TypeScript
import { chromatic } from "testHelpers/chromatic";
|
|
import { mockApiError, MockTemplateExample } from "testHelpers/entities";
|
|
import { StarterTemplatePageView } from "./StarterTemplatePageView";
|
|
|
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
|
|
const meta: Meta<typeof StarterTemplatePageView> = {
|
|
title: "pages/StarterTemplatePage",
|
|
parameters: { chromatic },
|
|
component: StarterTemplatePageView,
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof StarterTemplatePageView>;
|
|
|
|
export const Example: Story = {
|
|
args: {
|
|
error: undefined,
|
|
starterTemplate: MockTemplateExample,
|
|
},
|
|
};
|
|
export const Error: Story = {
|
|
args: {
|
|
error: mockApiError({
|
|
message: `Example ${MockTemplateExample.id} not found.`,
|
|
}),
|
|
starterTemplate: undefined,
|
|
},
|
|
};
|