Skip to content

Commit 53d83d2

Browse files
refactor: replace MUI buttons on Alerts (#16209)
Related to #14978
1 parent 5762d8a commit 53d83d2

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

site/src/components/Alert/Alert.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Button from "@mui/material/Button";
21
import type { Meta, StoryObj } from "@storybook/react";
2+
import { Button } from "components/Button/Button";
33
import { Alert } from "./Alert";
44

55
const meta: Meta<typeof Alert> = {
@@ -11,7 +11,7 @@ export default meta;
1111
type Story = StoryObj<typeof Alert>;
1212

1313
const ExampleAction = (
14-
<Button onClick={() => null} size="small" variant="text">
14+
<Button onClick={() => null} size="sm" variant="subtle">
1515
Button
1616
</Button>
1717
);

site/src/components/Alert/Alert.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import MuiAlert, {
33
type AlertProps as MuiAlertProps,
44
// biome-ignore lint/nursery/noRestrictedImports: Used as base component
55
} from "@mui/material/Alert";
6-
import Button from "@mui/material/Button";
76
import Collapse from "@mui/material/Collapse";
7+
import { Button } from "components/Button/Button";
88
import {
99
type FC,
1010
type PropsWithChildren,
@@ -51,8 +51,8 @@ export const Alert: FC<AlertProps> = ({
5151
{/* close CTA */}
5252
{dismissible && (
5353
<Button
54-
variant="text"
55-
size="small"
54+
variant="subtle"
55+
size="sm"
5656
onClick={() => {
5757
setOpen(false);
5858
onDismiss?.();

site/src/components/Alert/ErrorAlert.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import Button from "@mui/material/Button";
21
import type { Meta, StoryObj } from "@storybook/react";
2+
import { Button } from "components/Button/Button";
33
import { mockApiError } from "testHelpers/entities";
44
import { ErrorAlert } from "./ErrorAlert";
55

@@ -21,7 +21,7 @@ export default meta;
2121
type Story = StoryObj<typeof ErrorAlert>;
2222

2323
const ExampleAction = (
24-
<Button onClick={() => null} size="small" variant="text">
24+
<Button onClick={() => null} size="sm" variant="subtle">
2525
Button
2626
</Button>
2727
);

site/src/pages/TerminalPage/TerminalAlerts.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import Button from "@mui/material/Button";
21
import Link from "@mui/material/Link";
32
import type { WorkspaceAgent } from "api/typesGenerated";
43
import { Alert, type AlertProps } from "components/Alert/Alert";
4+
import { Button } from "components/Button/Button";
55
import { type FC, useEffect, useRef, useState } from "react";
66
import { docs } from "utils/docs";
77
import type { ConnectionStatus } from "./types";
@@ -186,8 +186,8 @@ const RefreshSessionButton: FC = () => {
186186
return (
187187
<Button
188188
disabled={isRefreshing}
189-
size="small"
190-
variant="text"
189+
size="sm"
190+
variant="subtle"
191191
onClick={() => {
192192
setIsRefreshing(true);
193193
window.location.reload();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy