File tree 3 files changed +0
-33
lines changed
site/src/components/Alert 3 files changed +0
-33
lines changed Original file line number Diff line number Diff line change 1
1
import { Alert } from "./Alert" ;
2
2
import Button from "@mui/material/Button" ;
3
- import Link from "@mui/material/Link" ;
4
3
import type { Meta , StoryObj } from "@storybook/react" ;
5
4
6
5
const meta : Meta < typeof Alert > = {
@@ -21,7 +20,6 @@ export const Success: Story = {
21
20
args : {
22
21
children : "You're doing great!" ,
23
22
severity : "success" ,
24
- onRetry : undefined ,
25
23
} ,
26
24
} ;
27
25
@@ -56,14 +54,3 @@ export const WarningWithActionAndDismiss: Story = {
56
54
severity : "warning" ,
57
55
} ,
58
56
} ;
59
-
60
- export const WithChildren : Story = {
61
- args : {
62
- severity : "warning" ,
63
- children : (
64
- < div >
65
- This is a message with a < Link href = "#" > link</ Link >
66
- </ div >
67
- ) ,
68
- } ,
69
- } ;
Original file line number Diff line number Diff line change @@ -8,14 +8,12 @@ import Box from "@mui/material/Box";
8
8
export type AlertProps = MuiAlertProps & {
9
9
actions ?: ReactNode ;
10
10
dismissible ?: boolean ;
11
- onRetry ?: ( ) => void ;
12
11
onDismiss ?: ( ) => void ;
13
12
} ;
14
13
15
14
export const Alert : FC < AlertProps > = ( {
16
15
children,
17
16
actions,
18
- onRetry,
19
17
dismissible,
20
18
severity,
21
19
onDismiss,
@@ -34,13 +32,6 @@ export const Alert: FC<AlertProps> = ({
34
32
{ /* CTAs passed in by the consumer */ }
35
33
{ actions }
36
34
37
- { /* retry CTA */ }
38
- { onRetry && (
39
- < Button variant = "text" size = "small" onClick = { onRetry } >
40
- Retry
41
- </ Button >
42
- ) }
43
-
44
35
{ /* close CTA */ }
45
36
{ dismissible && (
46
37
< Button
Original file line number Diff line number Diff line change 1
1
import Button from "@mui/material/Button" ;
2
2
import { mockApiError } from "testHelpers/entities" ;
3
3
import type { Meta , StoryObj } from "@storybook/react" ;
4
- import { action } from "@storybook/addon-actions" ;
5
4
import { ErrorAlert } from "./ErrorAlert" ;
6
5
7
6
const mockError = mockApiError ( {
@@ -15,7 +14,6 @@ const meta: Meta<typeof ErrorAlert> = {
15
14
args : {
16
15
error : mockError ,
17
16
dismissible : false ,
18
- onRetry : undefined ,
19
17
} ,
20
18
} ;
21
19
@@ -57,15 +55,6 @@ export const WithActionAndDismiss: Story = {
57
55
58
56
export const WithRetry : Story = {
59
57
args : {
60
- onRetry : action ( "retry" ) ,
61
- dismissible : true ,
62
- } ,
63
- } ;
64
-
65
- export const WithActionRetryAndDismiss : Story = {
66
- args : {
67
- actions : [ ExampleAction ] ,
68
- onRetry : action ( "retry" ) ,
69
58
dismissible : true ,
70
59
} ,
71
60
} ;
You can’t perform that action at this time.
0 commit comments