snowballtools-base/packages/frontend/src/stories/Project/Settings/AddEnvironmentVariableRow.stories.tsx

66 lines
1.3 KiB
TypeScript
Raw Normal View History

2024-05-13 21:28:37 +00:00
import { Meta, StoryObj } from '@storybook/react';
import {
reactRouterParameters,
withRouter,
} from 'storybook-addon-remix-react-router';
import AddEnvironmentVariableRow from 'components/projects/project/settings/AddEnvironmentVariableRow';
const meta: Meta<typeof AddEnvironmentVariableRow> = {
title: 'Project/Settings/AddEnvironmentVariableRow',
component: AddEnvironmentVariableRow,
tags: ['autodocs'],
decorators: [withRouter],
parameters: {
reactRouter: reactRouterParameters({
location: {
pathParams: { userId: 'me' },
},
routing: {
path: '/snowball-tools-1/projects/6bb3bec2-d71b-4fc0-9e32-4767f68668f4/settings',
},
}),
},
2024-05-17 00:33:33 +00:00
argTypes: {
onDelete: {
action: 'delete',
},
register: {
action: 'register',
},
index: {
type: 'number',
},
isDeleteDisabled: {
type: 'boolean',
},
},
args: {
isDeleteDisabled: false,
},
};
2024-05-13 21:28:37 +00:00
export default meta;
type Story = StoryObj<typeof AddEnvironmentVariableRow>;
export const Default: Story = {};
2024-05-17 00:33:33 +00:00
export const DisabledDelete: Story = {
args: {
isDeleteDisabled: true,
},
};
export const First: Story = {
args: {
index: 0,
},
};
export const Second: Story = {
args: {
index: 1,
},
};