|
1 |
| -import { ComponentMeta, Story } from "@storybook/react" |
| 1 | +import { Meta, StoryObj } from "@storybook/react" |
2 | 2 | import { mockApiError, MockDeploymentDAUResponse } from "testHelpers/entities"
|
3 |
| -import { |
4 |
| - GeneralSettingsPageView, |
5 |
| - GeneralSettingsPageViewProps, |
6 |
| -} from "./GeneralSettingsPageView" |
| 3 | +import { GeneralSettingsPageView } from "./GeneralSettingsPageView" |
7 | 4 |
|
8 |
| -export default { |
| 5 | +const meta: Meta<typeof GeneralSettingsPageView> = { |
9 | 6 | title: "pages/GeneralSettingsPageView",
|
10 | 7 | component: GeneralSettingsPageView,
|
11 | 8 | args: {
|
12 | 9 | deploymentOptions: [
|
13 | 10 | {
|
14 | 11 | name: "Access URL",
|
15 | 12 | description:
|
16 |
| - "External URL to access your deployment. This must be accessible by all provisioned workspaces.", |
| 13 | + "The URL that users will use to access the Coder deployment.", |
| 14 | + flag: "access-url", |
| 15 | + flag_shorthand: "", |
17 | 16 | value: "https://dev.coder.com",
|
| 17 | + hidden: false, |
18 | 18 | },
|
19 | 19 | {
|
20 | 20 | name: "Wildcard Access URL",
|
21 | 21 | description:
|
22 | 22 | 'Specifies the wildcard hostname to use for workspace applications in the form "*.example.com".',
|
| 23 | + flag: "wildcard-access-url", |
| 24 | + flag_shorthand: "", |
23 | 25 | value: "*--apps.dev.coder.com",
|
| 26 | + hidden: false, |
| 27 | + }, |
| 28 | + { |
| 29 | + name: "Experiments", |
| 30 | + description: |
| 31 | + "Enable one or more experiments. These are not ready for production. Separate multiple experiments with commas, or enter '*' to opt-in to all available experiments.", |
| 32 | + flag: "experiments", |
| 33 | + value: [ |
| 34 | + "*", |
| 35 | + "moons", |
| 36 | + "workspace_actions", |
| 37 | + "single_tailnet", |
| 38 | + "deployment_health_page", |
| 39 | + "template_parameters_insights", |
| 40 | + ], |
| 41 | + flag_shorthand: "", |
| 42 | + hidden: false, |
24 | 43 | },
|
25 | 44 | ],
|
26 | 45 | deploymentDAUs: MockDeploymentDAUResponse,
|
27 | 46 | },
|
28 |
| -} as ComponentMeta<typeof GeneralSettingsPageView> |
| 47 | +} |
| 48 | + |
| 49 | +export default meta |
| 50 | +type Story = StoryObj<typeof GeneralSettingsPageView> |
29 | 51 |
|
30 |
| -const Template: Story<GeneralSettingsPageViewProps> = (args) => ( |
31 |
| - <GeneralSettingsPageView {...args} /> |
32 |
| -) |
33 |
| -export const Page = Template.bind({}) |
| 52 | +export const Page: Story = {} |
34 | 53 |
|
35 |
| -export const NoDAUs = Template.bind({}) |
36 |
| -NoDAUs.args = { |
37 |
| - deploymentDAUs: undefined, |
| 54 | +export const NoDAUs: Story = { |
| 55 | + args: { |
| 56 | + deploymentDAUs: undefined, |
| 57 | + }, |
38 | 58 | }
|
39 | 59 |
|
40 |
| -export const DAUError = Template.bind({}) |
41 |
| -DAUError.args = { |
42 |
| - deploymentDAUs: undefined, |
43 |
| - getDeploymentDAUsError: mockApiError({ |
44 |
| - message: "Error fetching DAUs.", |
45 |
| - }), |
| 60 | +export const DAUError: Story = { |
| 61 | + args: { |
| 62 | + deploymentDAUs: undefined, |
| 63 | + getDeploymentDAUsError: mockApiError({ |
| 64 | + message: "Error fetching DAUs.", |
| 65 | + }), |
| 66 | + }, |
46 | 67 | }
|
0 commit comments