From d58449b36e2f61e1e6a105616816ec4fd4976347 Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Tue, 21 Jan 2025 12:44:50 +0000 Subject: [PATCH 1/3] refactor: replace MUI buttons on Alerts --- site/src/components/Alert/Alert.stories.tsx | 4 ++-- site/src/components/Alert/Alert.tsx | 6 +++--- site/src/components/Alert/ErrorAlert.stories.tsx | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/site/src/components/Alert/Alert.stories.tsx b/site/src/components/Alert/Alert.stories.tsx index 4366af6ce9eba..9ffe1c6a55b25 100644 --- a/site/src/components/Alert/Alert.stories.tsx +++ b/site/src/components/Alert/Alert.stories.tsx @@ -1,6 +1,6 @@ -import Button from "@mui/material/Button"; import type { Meta, StoryObj } from "@storybook/react"; import { Alert } from "./Alert"; +import { Button } from "components/Button/Button"; const meta: Meta = { title: "components/Alert", @@ -11,7 +11,7 @@ export default meta; type Story = StoryObj; const ExampleAction = ( - ); diff --git a/site/src/components/Alert/Alert.tsx b/site/src/components/Alert/Alert.tsx index 7750a6bc7d1e8..e97b690f82833 100644 --- a/site/src/components/Alert/Alert.tsx +++ b/site/src/components/Alert/Alert.tsx @@ -3,8 +3,8 @@ import MuiAlert, { type AlertProps as MuiAlertProps, // biome-ignore lint/nursery/noRestrictedImports: Used as base component } from "@mui/material/Alert"; -import Button from "@mui/material/Button"; import Collapse from "@mui/material/Collapse"; +import { Button } from "components/Button/Button"; import { type FC, type PropsWithChildren, @@ -51,8 +51,8 @@ export const Alert: FC = ({ {/* close CTA */} {dismissible && ( ); From a5c484a557b1597dc4b1b4fa78b06b4496bbb6d3 Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Tue, 21 Jan 2025 12:47:20 +0000 Subject: [PATCH 2/3] Run fmt --- site/src/components/Alert/Alert.stories.tsx | 2 +- site/src/components/Alert/ErrorAlert.stories.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/site/src/components/Alert/Alert.stories.tsx b/site/src/components/Alert/Alert.stories.tsx index 9ffe1c6a55b25..a170f0b29d244 100644 --- a/site/src/components/Alert/Alert.stories.tsx +++ b/site/src/components/Alert/Alert.stories.tsx @@ -1,6 +1,6 @@ import type { Meta, StoryObj } from "@storybook/react"; -import { Alert } from "./Alert"; import { Button } from "components/Button/Button"; +import { Alert } from "./Alert"; const meta: Meta = { title: "components/Alert", diff --git a/site/src/components/Alert/ErrorAlert.stories.tsx b/site/src/components/Alert/ErrorAlert.stories.tsx index 42c4f64f2f4f6..e62314c622cc6 100644 --- a/site/src/components/Alert/ErrorAlert.stories.tsx +++ b/site/src/components/Alert/ErrorAlert.stories.tsx @@ -1,7 +1,7 @@ import type { Meta, StoryObj } from "@storybook/react"; +import { Button } from "components/Button/Button"; import { mockApiError } from "testHelpers/entities"; import { ErrorAlert } from "./ErrorAlert"; -import { Button } from "components/Button/Button"; const mockError = mockApiError({ message: "Email or password was invalid", From dab9a35fd822e6c69f6d7a3e02d72d533facc2b7 Mon Sep 17 00:00:00 2001 From: BrunoQuaresma Date: Tue, 21 Jan 2025 13:09:00 +0000 Subject: [PATCH 3/3] Fix TerminalAlerts --- site/src/pages/TerminalPage/TerminalAlerts.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/src/pages/TerminalPage/TerminalAlerts.tsx b/site/src/pages/TerminalPage/TerminalAlerts.tsx index 556dab3b0582c..2876ad51aaa62 100644 --- a/site/src/pages/TerminalPage/TerminalAlerts.tsx +++ b/site/src/pages/TerminalPage/TerminalAlerts.tsx @@ -1,7 +1,7 @@ -import Button from "@mui/material/Button"; import Link from "@mui/material/Link"; import type { WorkspaceAgent } from "api/typesGenerated"; import { Alert, type AlertProps } from "components/Alert/Alert"; +import { Button } from "components/Button/Button"; import { type FC, useEffect, useRef, useState } from "react"; import { docs } from "utils/docs"; import type { ConnectionStatus } from "./types"; @@ -186,8 +186,8 @@ const RefreshSessionButton: FC = () => { return (