+
Delete project
diff --git a/packages/frontend/src/stories/Components/Icons/EditBigIcon.stories.tsx b/packages/frontend/src/stories/Components/Icons/EditBigIcon.stories.tsx
new file mode 100644
index 00000000..d91df2b9
--- /dev/null
+++ b/packages/frontend/src/stories/Components/Icons/EditBigIcon.stories.tsx
@@ -0,0 +1,29 @@
+import { Meta, StoryObj } from '@storybook/react';
+
+import { EditBigIcon } from 'components/shared/CustomIcon';
+
+const meta: Meta = {
+ title: 'Icons/EditBigIcon',
+ component: EditBigIcon,
+ tags: ['autodocs'],
+ argTypes: {
+ size: {
+ control: 'text',
+ },
+ name: {
+ control: 'text',
+ },
+ },
+};
+
+export default meta;
+
+type Story = StoryObj;
+
+export const Default: Story = {
+ render: ({ size, name }) => ,
+ args: {
+ size: '24px',
+ name: 'plus',
+ },
+};
diff --git a/packages/frontend/src/stories/Components/Icons/HideEyeOffIcon.stories.tsx b/packages/frontend/src/stories/Components/Icons/HideEyeOffIcon.stories.tsx
new file mode 100644
index 00000000..ba8e2817
--- /dev/null
+++ b/packages/frontend/src/stories/Components/Icons/HideEyeOffIcon.stories.tsx
@@ -0,0 +1,29 @@
+import { Meta, StoryObj } from '@storybook/react';
+
+import { HideEyeOffIcon } from 'components/shared/CustomIcon';
+
+const meta: Meta = {
+ title: 'Icons/HideEyeOffIcon',
+ component: HideEyeOffIcon,
+ tags: ['autodocs'],
+ argTypes: {
+ size: {
+ control: 'text',
+ },
+ name: {
+ control: 'text',
+ },
+ },
+};
+
+export default meta;
+
+type Story = StoryObj;
+
+export const Default: Story = {
+ render: ({ size, name }) => ,
+ args: {
+ size: '24px',
+ name: 'plus',
+ },
+};
diff --git a/packages/frontend/src/stories/Components/Icons/ShowEyeIcon.stories.tsx b/packages/frontend/src/stories/Components/Icons/ShowEyeIcon.stories.tsx
new file mode 100644
index 00000000..dbe81967
--- /dev/null
+++ b/packages/frontend/src/stories/Components/Icons/ShowEyeIcon.stories.tsx
@@ -0,0 +1,29 @@
+import { Meta, StoryObj } from '@storybook/react';
+
+import { ShowEyeIcon } from 'components/shared/CustomIcon';
+
+const meta: Meta = {
+ title: 'Icons/ShowEyeIcon',
+ component: ShowEyeIcon,
+ tags: ['autodocs'],
+ argTypes: {
+ size: {
+ control: 'text',
+ },
+ name: {
+ control: 'text',
+ },
+ },
+};
+
+export default meta;
+
+type Story = StoryObj;
+
+export const Default: Story = {
+ render: ({ size, name }) => ,
+ args: {
+ size: '24px',
+ name: 'plus',
+ },
+};
diff --git a/packages/frontend/src/stories/MockStoriesData.ts b/packages/frontend/src/stories/MockStoriesData.ts
new file mode 100644
index 00000000..c3e3ac25
--- /dev/null
+++ b/packages/frontend/src/stories/MockStoriesData.ts
@@ -0,0 +1,114 @@
+import {
+ User,
+ Project,
+ Organization,
+ Role,
+ OrganizationMember,
+ ProjectMember,
+ EnvironmentVariable,
+ Deployment,
+ DeploymentStatus,
+ DomainStatus,
+ Domain,
+ Environment,
+} from 'gql-client';
+
+export const user: User = {
+ id: '1',
+ email: 'helloworld@helloworld.com',
+ isVerified: true,
+ createdAt: '2021-08-01T00:00:00.000Z',
+ name: 'Hello World',
+ updatedAt: '2021-08-01T00:00:00.000Z',
+ gitHubToken: 'GitHub Token',
+};
+
+export const organizationMember: OrganizationMember = {
+ id: '1',
+ member: user,
+ role: Role.Owner,
+ createdAt: '2021-08-01T00:00:00.000Z',
+ updatedAt: '2021-08-01T00:00:00.000Z',
+};
+
+export const organization: Organization = {
+ id: '1',
+ name: 'Organization',
+ slug: 'organization',
+ createdAt: '2021-08-01T00:00:00.000Z',
+ updatedAt: '2021-08-01T00:00:00.000Z',
+ members: [organizationMember],
+ projects: [],
+};
+
+export const member: ProjectMember = {
+ id: '1',
+ member: user,
+ permissions: [],
+ isPending: false,
+ createdAt: '2021-08-01T00:00:00.000Z',
+ updatedAt: '2021-08-01T00:00:00.000Z',
+};
+
+export const environmentVariable0: EnvironmentVariable = {
+ id: '1',
+ key: 'API_KEY',
+ value: '123456',
+ environment: Environment.Development,
+ createdAt: '2021-08-01T00:00:00.000Z',
+ updatedAt: '2021-08-01T00:00:00.000Z',
+};
+
+export const environmentVariable1: EnvironmentVariable = {
+ id: '2',
+ key: 'API_KEY_2',
+ value: '123456',
+ environment: Environment.Development,
+ createdAt: '2021-08-01T00:00:00.000Z',
+ updatedAt: '2021-08-01T00:00:00.000Z',
+};
+
+export const domain0: Domain = {
+ id: '1',
+ name: 'Domain',
+ createdAt: '2021-08-01T00:00:00.000Z',
+ updatedAt: '2021-08-01T00:00:00.000Z',
+ branch: 'Branch',
+ status: DomainStatus.Live,
+ redirectTo: null,
+};
+
+export const deployment0: Deployment = {
+ id: '1',
+ url: 'https://deployment.com',
+ status: DeploymentStatus.Ready,
+ createdAt: '2021-08-01T00:00:00.000Z',
+ updatedAt: '2021-08-01T00:00:00.000Z',
+ branch: 'Branch',
+ environment: Environment.Development,
+ isCurrent: true,
+ commitHash: 'Commit Hash',
+ domain: domain0,
+ commitMessage: 'Commit Message',
+ createdBy: user,
+};
+
+export const project: Project = {
+ id: '1',
+ name: 'GithubUsername-ProjectName',
+ owner: user,
+ deployments: [deployment0],
+ repository: 'Repository',
+ prodBranch: 'Prod Branch',
+ description: 'Description',
+ createdAt: '2021-08-01T00:00:00.000Z',
+ updatedAt: '2021-08-01T00:00:00.000Z',
+ framework: 'NextJS',
+ environmentVariables: [environmentVariable0, environmentVariable1],
+ organization: organization,
+ template: 'Template',
+ members: [member],
+ webhooks: ['beepboop'],
+ icon: 'Icon',
+ subDomain: 'SubDomain',
+};
diff --git a/packages/frontend/src/stories/Project/Settings/General.stories.tsx b/packages/frontend/src/stories/Project/Settings/AddEnvironmentVariableRow.stories.tsx
similarity index 63%
rename from packages/frontend/src/stories/Project/Settings/General.stories.tsx
rename to packages/frontend/src/stories/Project/Settings/AddEnvironmentVariableRow.stories.tsx
index 9851e20b..458bfa70 100644
--- a/packages/frontend/src/stories/Project/Settings/General.stories.tsx
+++ b/packages/frontend/src/stories/Project/Settings/AddEnvironmentVariableRow.stories.tsx
@@ -21,10 +21,45 @@ const meta: Meta = {
},
}),
},
-} as Meta;
+ argTypes: {
+ onDelete: {
+ action: 'delete',
+ },
+ register: {
+ action: 'register',
+ },
+ index: {
+ type: 'number',
+ },
+ isDeleteDisabled: {
+ type: 'boolean',
+ },
+ },
+ args: {
+ isDeleteDisabled: false,
+ },
+};
export default meta;
type Story = StoryObj;
export const Default: Story = {};
+
+export const DisabledDelete: Story = {
+ args: {
+ isDeleteDisabled: true,
+ },
+};
+
+export const First: Story = {
+ args: {
+ index: 0,
+ },
+};
+
+export const Second: Story = {
+ args: {
+ index: 1,
+ },
+};
diff --git a/packages/frontend/src/stories/Project/Settings/AddMemberDialog.stories.tsx b/packages/frontend/src/stories/Project/Settings/AddMemberDialog.stories.tsx
new file mode 100644
index 00000000..8c7a55c8
--- /dev/null
+++ b/packages/frontend/src/stories/Project/Settings/AddMemberDialog.stories.tsx
@@ -0,0 +1,31 @@
+import { Meta, StoryObj } from '@storybook/react';
+
+import AddMemberDialog from 'components/projects/project/settings/AddMemberDialog';
+
+const meta: Meta = {
+ title: 'Project/Settings/AddMemberDialog',
+ component: AddMemberDialog,
+ tags: ['autodocs'],
+ argTypes: {
+ open: {
+ control: {
+ type: 'boolean',
+ },
+ },
+ handleOpen: {
+ action: 'open',
+ },
+ handleAddMember: {
+ action: 'addMember',
+ },
+ },
+ args: {
+ open: true,
+ },
+};
+
+export default meta;
+
+type Story = StoryObj;
+
+export const Default: Story = {};
diff --git a/packages/frontend/src/stories/Project/Settings/DeleteProjectDialog.stories.tsx b/packages/frontend/src/stories/Project/Settings/DeleteProjectDialog.stories.tsx
new file mode 100644
index 00000000..e3fe7f7e
--- /dev/null
+++ b/packages/frontend/src/stories/Project/Settings/DeleteProjectDialog.stories.tsx
@@ -0,0 +1,50 @@
+import { Meta, StoryObj } from '@storybook/react';
+import {
+ reactRouterParameters,
+ withRouter,
+} from 'storybook-addon-remix-react-router';
+
+import DeleteProjectDialog from 'components/projects/project/settings/DeleteProjectDialog';
+import { project } from '../../MockStoriesData';
+
+const meta: Meta = {
+ title: 'Project/Settings/DeleteProjectDialog',
+ component: DeleteProjectDialog,
+ tags: ['autodocs'],
+ decorators: [withRouter],
+ parameters: {
+ reactRouter: reactRouterParameters({
+ location: {
+ pathParams: { userId: 'me' },
+ },
+ routing: {
+ path: '/snowball-tools-1/projects/6bb3bec2-d71b-4fc0-9e32-4767f68668f4/settings',
+ },
+ }),
+ },
+ argTypes: {
+ open: {
+ control: {
+ type: 'boolean',
+ },
+ },
+ handleOpen: {
+ action: 'open',
+ },
+ project: {
+ control: {
+ type: 'object',
+ },
+ },
+ },
+ args: {
+ open: true,
+ project: project,
+ },
+};
+
+export default meta;
+
+type Story = StoryObj;
+
+export const Default: Story = {};
diff --git a/packages/frontend/src/stories/Project/Settings/DisplayEnvironmentVariables.stories.tsx b/packages/frontend/src/stories/Project/Settings/DisplayEnvironmentVariables.stories.tsx
new file mode 100644
index 00000000..a3ccc0a8
--- /dev/null
+++ b/packages/frontend/src/stories/Project/Settings/DisplayEnvironmentVariables.stories.tsx
@@ -0,0 +1,38 @@
+import { Meta, StoryObj } from '@storybook/react';
+
+import DisplayEnvironmentVariables from 'components/projects/project/settings/DisplayEnvironmentVariables';
+import {
+ environmentVariable0,
+ environmentVariable1,
+} from '../../MockStoriesData';
+import { Environment } from 'gql-client';
+
+const meta: Meta = {
+ title: 'Project/Settings/DisplayEnvironmentVariables',
+ component: DisplayEnvironmentVariables,
+ argTypes: {
+ environment: {
+ control: {
+ type: 'object',
+ },
+ },
+ variables: {
+ control: {
+ type: 'object',
+ },
+ },
+ onUpdate: {
+ action: 'update',
+ },
+ },
+ args: {
+ environment: Environment.Development,
+ variables: [environmentVariable0, environmentVariable1],
+ },
+};
+
+export default meta;
+
+type Story = StoryObj;
+
+export const Default: Story = {};
diff --git a/packages/frontend/src/stories/Project/Settings/EditEnvironmentVariableRow.stories.tsx b/packages/frontend/src/stories/Project/Settings/EditEnvironmentVariableRow.stories.tsx
new file mode 100644
index 00000000..811b0ea4
--- /dev/null
+++ b/packages/frontend/src/stories/Project/Settings/EditEnvironmentVariableRow.stories.tsx
@@ -0,0 +1,28 @@
+import { Meta, StoryObj } from '@storybook/react';
+
+import EditEnvironmentVariableRow from 'components/projects/project/settings/EditEnvironmentVariableRow';
+import { environmentVariable0 } from '../../MockStoriesData';
+
+const meta: Meta = {
+ title: 'Project/Settings/EditEnvironmentVariableRow',
+ component: EditEnvironmentVariableRow,
+ argTypes: {
+ variable: {
+ control: {
+ type: 'object',
+ },
+ },
+ onUpdate: {
+ action: 'update',
+ },
+ },
+ args: {
+ variable: environmentVariable0,
+ },
+};
+
+export default meta;
+
+type Story = StoryObj;
+
+export const Default: Story = {};
diff --git a/packages/frontend/src/stories/Project/Settings/SetupDomains.stories.tsx b/packages/frontend/src/stories/Project/Settings/SetupDomains.stories.tsx
index 560dbe74..7c416099 100644
--- a/packages/frontend/src/stories/Project/Settings/SetupDomains.stories.tsx
+++ b/packages/frontend/src/stories/Project/Settings/SetupDomains.stories.tsx
@@ -17,7 +17,7 @@ const meta: Meta = {
pathParams: { userId: 'me' },
},
routing: {
- path: '/snowball-tools-1/projects/6bb3bec2-d71b-4fc0-9e32-4767f68668f4/settings/domains/add',
+ path: '/snowball-tools-1/projects/6bb3bec2-d71b-4fc0-9e32-4767f68668f4/settings/domains',
},
}),
},
diff --git a/packages/frontend/tailwind.config.js b/packages/frontend/tailwind.config.js
index 7ad42dca..f561b2c6 100644
--- a/packages/frontend/tailwind.config.js
+++ b/packages/frontend/tailwind.config.js
@@ -14,9 +14,6 @@ export default withMT({
xxs: '400px',
xs: '480px',
},
- zIndex: {
- tooltip: '52',
- },
letterSpacing: {
tight: '-0.084px',
},
@@ -178,6 +175,7 @@ export default withMT({
4.5: '1.125rem',
},
zIndex: {
+ tooltip: '52',
toast: '9999',
},
animation: {
diff --git a/packages/frontend/vite.config.ts b/packages/frontend/vite.config.ts
index d9bb608b..e40bea3b 100644
--- a/packages/frontend/vite.config.ts
+++ b/packages/frontend/vite.config.ts
@@ -1,9 +1,9 @@
-import { defineConfig } from 'vite';
+import { defineConfig, PluginOption } from 'vite';
import react from '@vitejs/plugin-react';
// https://vitejs.dev/config/
export default defineConfig({
- plugins: [react()],
+ plugins: [react()] as PluginOption[],
resolve: {
alias: {
utils: '/src/utils',