diff --git a/site/src/components/Link/Link.tsx b/site/src/components/Link/Link.tsx index e9946629e3..ddec9953eb 100644 --- a/site/src/components/Link/Link.tsx +++ b/site/src/components/Link/Link.tsx @@ -22,7 +22,7 @@ const linkVariants = cva( }, ); -type LinkProps = React.AnchorHTMLAttributes & +export type LinkProps = React.AnchorHTMLAttributes & VariantProps & { asChild?: boolean; showExternalIcon?: boolean; diff --git a/site/src/modules/workspaces/WorkspaceTiming/WorkspaceTimings.tsx b/site/src/modules/workspaces/WorkspaceTiming/WorkspaceTimings.tsx index 6a4759e80f..b3bc498a37 100644 --- a/site/src/modules/workspaces/WorkspaceTiming/WorkspaceTimings.tsx +++ b/site/src/modules/workspaces/WorkspaceTiming/WorkspaceTimings.tsx @@ -1,4 +1,3 @@ -import Collapse from "@mui/material/Collapse"; import sortBy from "lodash/sortBy"; import uniqBy from "lodash/uniqBy"; import { type FC, useState } from "react"; @@ -9,6 +8,11 @@ import type { } from "#/api/typesGenerated"; import { ChevronDownIcon } from "#/components/AnimatedIcons/ChevronDown"; import { Button } from "#/components/Button/Button"; +import { + Collapsible, + CollapsibleContent, + CollapsibleTrigger, +} from "#/components/Collapsible/Collapsible"; import { Skeleton } from "#/components/Skeleton/Skeleton"; import { calcDuration, @@ -99,17 +103,22 @@ export const WorkspaceTimings: FC = ({ }; return ( -
+
- + + + {isLoading ? ( @@ -119,7 +128,7 @@ export const WorkspaceTimings: FC = ({
{!isLoading && ( - +
= ({ )}
-
+ )} -
+ ); }; diff --git a/site/src/pages/WorkspacePage/WorkspaceScheduleControls.tsx b/site/src/pages/WorkspacePage/WorkspaceScheduleControls.tsx index d6c9c2df47..319a8abe44 100644 --- a/site/src/pages/WorkspacePage/WorkspaceScheduleControls.tsx +++ b/site/src/pages/WorkspacePage/WorkspaceScheduleControls.tsx @@ -1,4 +1,3 @@ -import Link, { type LinkProps } from "@mui/material/Link"; import dayjs, { type Dayjs } from "dayjs"; import { ClockIcon, MinusIcon, PlusIcon } from "lucide-react"; import { type FC, type ReactNode, useRef, useState } from "react"; @@ -13,6 +12,7 @@ import { import type { Template, Workspace } from "#/api/typesGenerated"; import { Button } from "#/components/Button/Button"; import { TopbarData, TopbarIcon } from "#/components/FullPageLayout/Topbar"; +import { Link, type LinkProps } from "#/components/Link/Link"; import { Tooltip, TooltipContent, @@ -271,14 +271,23 @@ const AutostopDisplay: FC = ({ ); }; -const ScheduleSettingsLink: React.FC = ({ ...props }) => { +const ScheduleSettingsLink: React.FC = ({ + children, + className, + ...props +}) => { return ( + asChild + > + {children} + ); }; diff --git a/site/src/pages/WorkspacePage/WorkspaceTopbar.tsx b/site/src/pages/WorkspacePage/WorkspaceTopbar.tsx index 09c3b39830..6d5a470cf6 100644 --- a/site/src/pages/WorkspacePage/WorkspaceTopbar.tsx +++ b/site/src/pages/WorkspacePage/WorkspaceTopbar.tsx @@ -1,4 +1,3 @@ -import Link from "@mui/material/Link"; import { ChevronLeftIcon, CircleDollarSignIcon, TrashIcon } from "lucide-react"; import type { FC } from "react"; import { useQuery } from "react-query"; @@ -21,6 +20,7 @@ import { HelpPopoverContent, HelpPopoverTrigger, } from "#/components/HelpPopover/HelpPopover"; +import { Link } from "#/components/Link/Link"; import { Tooltip, TooltipContent, @@ -164,9 +164,7 @@ export const WorkspaceTopbar: FC = ({ {quota && quota.budget > 0 && ( - = ({ ? `See affected workspaces for ${orgDisplayName}` : "See affected workspaces" } + className="text-inherit no-underline" > @@ -192,7 +191,7 @@ export const WorkspaceTopbar: FC = ({ {quota.budget} - + )} {shouldDisplayDormantData && ( @@ -200,18 +199,17 @@ export const WorkspaceTopbar: FC = ({ - {workspace.deleting_at ? ( <>Deletion on {formatDate(new Date(workspace.deleting_at))} ) : ( "Deletion soon" )} - + )} @@ -311,12 +309,8 @@ const OrganizationBreadcrumb: FC = ({ - {orgName} + + {orgName} ) : ( orgName @@ -376,21 +370,19 @@ const WorkspaceBreadcrumb: FC = ({ - {templateDisplayName} + + + {templateDisplayName} + } subtitle={ - - Version: {latestBuildVersionName} + + + Version: {latestBuildVersionName} + } avatar={