From 53d83d2da7a7d97ebfa625acec4a26518bf444a2 Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Tue, 21 Jan 2025 10:27:02 -0300 Subject: [PATCH] refactor: replace MUI buttons on Alerts (#16209) Related to https://github.com/coder/coder/issues/14978 --- site/src/components/Alert/Alert.stories.tsx | 4 ++-- site/src/components/Alert/Alert.tsx | 6 +++--- site/src/components/Alert/ErrorAlert.stories.tsx | 4 ++-- site/src/pages/TerminalPage/TerminalAlerts.tsx | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/site/src/components/Alert/Alert.stories.tsx b/site/src/components/Alert/Alert.stories.tsx index 4366af6ce9..a170f0b29d 100644 --- a/site/src/components/Alert/Alert.stories.tsx +++ b/site/src/components/Alert/Alert.stories.tsx @@ -1,5 +1,5 @@ -import Button from "@mui/material/Button"; import type { Meta, StoryObj } from "@storybook/react"; +import { Button } from "components/Button/Button"; import { Alert } from "./Alert"; const meta: Meta = { @@ -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 7750a6bc7d..e97b690f82 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 && ( ); diff --git a/site/src/pages/TerminalPage/TerminalAlerts.tsx b/site/src/pages/TerminalPage/TerminalAlerts.tsx index 556dab3b05..2876ad51aa 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 (