aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/mui/Alert.stories.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/mui/Alert.stories.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/mui/Alert.stories.tsx12
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/taler-wallet-webextension/src/mui/Alert.stories.tsx b/packages/taler-wallet-webextension/src/mui/Alert.stories.tsx
index 12b2a8625..a2c8576c7 100644
--- a/packages/taler-wallet-webextension/src/mui/Alert.stories.tsx
+++ b/packages/taler-wallet-webextension/src/mui/Alert.stories.tsx
@@ -68,18 +68,22 @@ export const WithTitle = (): VNode => (
</Wrapper>
);
+const showSomething = async function (): Promise<void> {
+ alert("closed");
+};
+
export const WithAction = (): VNode => (
<Wrapper>
- <Alert title="Warning" severity="warning" onClose={() => alert("closed")}>
+ <Alert title="Warning" severity="warning" onClose={showSomething}>
this is an warning
</Alert>
- <Alert title="Error" severity="error" onClose={() => alert("closed")}>
+ <Alert title="Error" severity="error" onClose={showSomething}>
this is an error
</Alert>
- <Alert title="Success" severity="success" onClose={() => alert("closed")}>
+ <Alert title="Success" severity="success" onClose={showSomething}>
this is an success
</Alert>
- <Alert title="Info" severity="info" onClose={() => alert("closed")}>
+ <Alert title="Info" severity="info" onClose={showSomething}>
this is an info
</Alert>
</Wrapper>