diff --git a/packages/frontend/src/components/projects/ProjectCard/ProjectCard.tsx b/packages/frontend/src/components/projects/ProjectCard/ProjectCard.tsx index 84a34b4f..c15d2db7 100644 --- a/packages/frontend/src/components/projects/ProjectCard/ProjectCard.tsx +++ b/packages/frontend/src/components/projects/ProjectCard/ProjectCard.tsx @@ -12,7 +12,7 @@ import { Button } from 'components/shared/Button'; import { BranchIcon, ClockIcon, - GitHubLogo, + GithubLogoIcon, HorizontalDotIcon, WarningDiamondIcon, } from 'components/shared/CustomIcon'; @@ -118,7 +118,7 @@ export const ProjectCard = ({
{hasDeployment ? ( <> - + {relativeTimeMs(project.deployments[0].createdAt)} on {project.deployments[0].branch} diff --git a/packages/frontend/src/components/shared/CustomIcon/BranchStrokeIcon.tsx b/packages/frontend/src/components/shared/CustomIcon/BranchStrokeIcon.tsx index 0348e35d..4ccb3590 100644 --- a/packages/frontend/src/components/shared/CustomIcon/BranchStrokeIcon.tsx +++ b/packages/frontend/src/components/shared/CustomIcon/BranchStrokeIcon.tsx @@ -3,16 +3,15 @@ import { CustomIcon, CustomIconProps } from './CustomIcon'; export const BranchStrokeIcon = (props: CustomIconProps) => { return ( ); diff --git a/packages/frontend/src/components/shared/CustomIcon/CollaboratorsIcon.tsx b/packages/frontend/src/components/shared/CustomIcon/CollaboratorsIcon.tsx new file mode 100644 index 00000000..ee1e05ec --- /dev/null +++ b/packages/frontend/src/components/shared/CustomIcon/CollaboratorsIcon.tsx @@ -0,0 +1,19 @@ +import { CustomIcon, CustomIconProps } from './CustomIcon'; + +export const CollaboratorsIcon = (props: CustomIconProps) => { + return ( + + + + ); +}; diff --git a/packages/frontend/src/components/shared/CustomIcon/GitHubLogo.tsx b/packages/frontend/src/components/shared/CustomIcon/GitHubLogoIcon.tsx similarity index 97% rename from packages/frontend/src/components/shared/CustomIcon/GitHubLogo.tsx rename to packages/frontend/src/components/shared/CustomIcon/GitHubLogoIcon.tsx index f870f83a..3793e04f 100644 --- a/packages/frontend/src/components/shared/CustomIcon/GitHubLogo.tsx +++ b/packages/frontend/src/components/shared/CustomIcon/GitHubLogoIcon.tsx @@ -1,6 +1,6 @@ import { CustomIcon, CustomIconProps } from './CustomIcon'; -export const GitHubLogo = (props: CustomIconProps) => { +export const GithubLogoIcon = (props: CustomIconProps) => { return ( { + return ( + + + + + ); +}; diff --git a/packages/frontend/src/components/shared/CustomIcon/index.ts b/packages/frontend/src/components/shared/CustomIcon/index.ts index f271b978..5e16803e 100644 --- a/packages/frontend/src/components/shared/CustomIcon/index.ts +++ b/packages/frontend/src/components/shared/CustomIcon/index.ts @@ -32,7 +32,7 @@ export * from './BuildingIcon'; export * from './CheckRadioIcon'; export * from './ChevronDownIcon'; export * from './BranchIcon'; -export * from './GitHubLogo'; +export * from './GitHubLogoIcon'; export * from './ClockIcon'; export * from './HorizontalDotIcon'; export * from './WarningDiamondIcon'; @@ -69,6 +69,8 @@ export * from './GoogleIcon'; export * from './KeyIcon'; export * from './TrashIcon'; export * from './CopyUnfilledIcon'; +export * from './SwitchIcon'; +export * from './CollaboratorsIcon'; // Templates export * from './templates'; diff --git a/packages/frontend/src/components/shared/Tabs/index.ts b/packages/frontend/src/components/shared/Tabs/index.ts index 856dbbb3..a28a031c 100644 --- a/packages/frontend/src/components/shared/Tabs/index.ts +++ b/packages/frontend/src/components/shared/Tabs/index.ts @@ -1 +1,4 @@ export * from './Tabs'; +export { default as TabsList } from './TabsList'; +export { default as TabsTrigger } from './TabsTrigger'; +export { default as TabsContent } from './TabsContent'; diff --git a/packages/frontend/src/pages/org-slug/projects/id/Deployments.tsx b/packages/frontend/src/pages/org-slug/projects/id/Deployments.tsx index 1775576e..66638354 100644 --- a/packages/frontend/src/pages/org-slug/projects/id/Deployments.tsx +++ b/packages/frontend/src/pages/org-slug/projects/id/Deployments.tsx @@ -7,7 +7,7 @@ import FilterForm, { FilterValue, StatusOptions, } from 'components/projects/project/deployments/FilterForm'; -import { OutletContextType } from '../../../../types/types'; +import { OutletContextType } from '../../../../types'; import { useGQLClient } from 'context/GQLClientContext'; import { Button } from 'components/shared/Button'; import { RefreshIcon } from 'components/shared/CustomIcon'; diff --git a/packages/frontend/src/pages/org-slug/projects/id/Overview.tsx b/packages/frontend/src/pages/org-slug/projects/id/Overview.tsx index 75e3153e..2de55d8c 100644 --- a/packages/frontend/src/pages/org-slug/projects/id/Overview.tsx +++ b/packages/frontend/src/pages/org-slug/projects/id/Overview.tsx @@ -4,10 +4,7 @@ import { Link, useNavigate, useOutletContext } from 'react-router-dom'; import { RequestError } from 'octokit'; import { useOctokit } from '../../../../context/OctokitContext'; -import { - GitCommitWithBranch, - OutletContextType, -} from '../../../../types/types'; +import { GitCommitWithBranch, OutletContextType } from '../../../../types'; import { useGQLClient } from '../../../../context/GQLClientContext'; import { Button } from 'components/shared/Button'; import { Heading } from 'components/shared/Heading'; diff --git a/packages/frontend/src/pages/org-slug/projects/id/Settings.tsx b/packages/frontend/src/pages/org-slug/projects/id/Settings.tsx index 1aad83a7..8f6367be 100644 --- a/packages/frontend/src/pages/org-slug/projects/id/Settings.tsx +++ b/packages/frontend/src/pages/org-slug/projects/id/Settings.tsx @@ -1,40 +1,46 @@ import { useMemo } from 'react'; import { Link, Outlet, useLocation, useOutletContext } from 'react-router-dom'; +import { OutletContextType } from '../../../../types'; import { Tabs, - TabsHeader, - TabsBody, - Tab, -} from '@snowballtools/material-tailwind-react-fork'; - -import { OutletContextType } from '../../../../types/types'; + TabsContent, + TabsList, + TabsTrigger, +} from 'components/shared/Tabs'; +import { + BranchStrokeIcon, + CollaboratorsIcon, + GearIcon, + GlobeIcon, + SwitchIcon, +} from 'components/shared/CustomIcon'; const tabsData = [ { label: 'General', - icon: '', + icon: , value: 'general', }, { label: 'Domains', - icon: '', + icon: , value: 'domains', }, { label: 'Git', - icon: '', + icon: , value: 'git', }, { label: 'Environment variables', - icon: '', + icon: , value: 'environment-variables', }, { - label: 'Members', - icon: '', - value: 'members', + label: 'Collaborators', + icon: , + value: 'collaborators', }, ]; @@ -57,31 +63,26 @@ const SettingsTabPanel = () => { - + {tabsData.map(({ label, value, icon }) => ( - -
-
{icon}
-
{label}
+
+
{icon}
+
{label}
- + ))} - - + + - + ); diff --git a/packages/frontend/src/pages/org-slug/projects/id/routes.tsx b/packages/frontend/src/pages/org-slug/projects/id/routes.tsx index 78b15816..4ae7e81d 100644 --- a/packages/frontend/src/pages/org-slug/projects/id/routes.tsx +++ b/packages/frontend/src/pages/org-slug/projects/id/routes.tsx @@ -4,7 +4,7 @@ import SettingsTabPanel from './Settings'; import GeneralTabPanel from './settings/General'; import GitTabPanel from './settings/Git'; import { EnvironmentVariablesTabPanel } from './settings/EnvironmentVariables'; -import MembersTabPanel from './settings/Members'; +import CollaboratorsTabPanel from './settings/Collaborators'; import Domains from './settings/Domains'; const Integrations = () => ( @@ -34,8 +34,8 @@ export const settingsTabRoutes = [ element: , }, { - path: 'members', - element: , + path: 'collaborators', + element: , }, ]; diff --git a/packages/frontend/src/pages/org-slug/projects/id/settings/Members.tsx b/packages/frontend/src/pages/org-slug/projects/id/settings/Collaborators.tsx similarity index 93% rename from packages/frontend/src/pages/org-slug/projects/id/settings/Members.tsx rename to packages/frontend/src/pages/org-slug/projects/id/settings/Collaborators.tsx index 7f118fff..9a343a34 100644 --- a/packages/frontend/src/pages/org-slug/projects/id/settings/Members.tsx +++ b/packages/frontend/src/pages/org-slug/projects/id/settings/Collaborators.tsx @@ -2,11 +2,11 @@ import { useCallback, useEffect, useState } from 'react'; import { useOutletContext } from 'react-router-dom'; import { Permission, AddProjectMemberInput, ProjectMember } from 'gql-client'; -import MemberCard from '../../../../../components/projects/project/settings/MemberCard'; -import AddMemberDialog from '../../../../../components/projects/project/settings/AddMemberDialog'; +import MemberCard from 'components/projects/project/settings/MemberCard'; +import AddMemberDialog from 'components/projects/project/settings/AddMemberDialog'; import { useGQLClient } from '../../../../../context/GQLClientContext'; import { OutletContextType } from '../../../../../types'; -import { useToast } from '../../../../../components/shared/Toast'; +import { useToast } from 'components/shared/Toast'; import { Button } from 'components/shared/Button'; import { PlusIcon } from 'components/shared/CustomIcon'; import { Badge } from 'components/shared/Badge'; @@ -14,7 +14,7 @@ import { Heading } from 'components/shared/Heading'; const FIRST_MEMBER_CARD = 0; -const MembersTabPanel = () => { +const CollaboratorsTabPanel = () => { const client = useGQLClient(); const { toast } = useToast(); const { project } = useOutletContext(); @@ -160,4 +160,4 @@ const MembersTabPanel = () => { ); }; -export default MembersTabPanel; +export default CollaboratorsTabPanel; diff --git a/packages/frontend/src/stories/Components/Icons/CollaboratorsIcon.stories.tsx b/packages/frontend/src/stories/Components/Icons/CollaboratorsIcon.stories.tsx new file mode 100644 index 00000000..3541b0a4 --- /dev/null +++ b/packages/frontend/src/stories/Components/Icons/CollaboratorsIcon.stories.tsx @@ -0,0 +1,29 @@ +import { Meta, StoryObj } from '@storybook/react'; + +import { CollaboratorsIcon } from 'components/shared/CustomIcon'; + +const meta: Meta = { + title: 'Components/CollaboratorsIcon', + component: CollaboratorsIcon, + 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/GithubLogoIcon.stories.tsx b/packages/frontend/src/stories/Components/Icons/GithubLogoIcon.stories.tsx new file mode 100644 index 00000000..ee5bb425 --- /dev/null +++ b/packages/frontend/src/stories/Components/Icons/GithubLogoIcon.stories.tsx @@ -0,0 +1,29 @@ +import { Meta, StoryObj } from '@storybook/react'; + +import { GithubLogoIcon } from 'components/shared/CustomIcon'; + +const meta: Meta = { + title: 'Icons/GithubLogoIcon', + component: GithubLogoIcon, + 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/GitHubLogo.stories.tsx b/packages/frontend/src/stories/Components/Icons/SwitchIcon.stories.tsx similarity index 53% rename from packages/frontend/src/stories/Components/Icons/GitHubLogo.stories.tsx rename to packages/frontend/src/stories/Components/Icons/SwitchIcon.stories.tsx index 2768d670..f8b3ded9 100644 --- a/packages/frontend/src/stories/Components/Icons/GitHubLogo.stories.tsx +++ b/packages/frontend/src/stories/Components/Icons/SwitchIcon.stories.tsx @@ -1,10 +1,10 @@ import { Meta, StoryObj } from '@storybook/react'; -import { GitHubLogo } from 'components/shared/CustomIcon'; +import { SwitchIcon } from 'components/shared/CustomIcon'; -const meta: Meta = { - title: 'Icons/GitHubLogo', - component: GitHubLogo, +const meta: Meta = { + title: 'Icons/SwitchIcon', + component: SwitchIcon, tags: ['autodocs'], argTypes: { size: { @@ -18,10 +18,10 @@ const meta: Meta = { export default meta; -type Story = StoryObj; +type Story = StoryObj; export const Default: Story = { - render: ({ size, name }) => , + render: ({ size, name }) => , args: { size: '24px', name: 'plus',