diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/mui/Alert.stories.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/mui/Alert.stories.tsx | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/packages/taler-wallet-webextension/src/mui/Alert.stories.tsx b/packages/taler-wallet-webextension/src/mui/Alert.stories.tsx index 62f7a2993..b0c2a2730 100644 --- a/packages/taler-wallet-webextension/src/mui/Alert.stories.tsx +++ b/packages/taler-wallet-webextension/src/mui/Alert.stories.tsx @@ -19,6 +19,7 @@ * @author Sebastian Javier Marchano (sebasjm) */ +import { TranslatedString } from "@gnu-taler/taler-util"; import { css } from "@linaria/core"; import { ComponentChildren, Fragment, h, VNode } from "preact"; import { Alert } from "./Alert.jsx"; @@ -53,16 +54,16 @@ export const BasicExample = (): VNode => ( export const WithTitle = (): VNode => ( <Wrapper> - <Alert title="Warning" severity="warning"> + <Alert title={"Warning" as TranslatedString} severity="warning"> this is an warning </Alert> - <Alert title="Error" severity="error"> + <Alert title={"Error" as TranslatedString} severity="error"> this is an error </Alert> - <Alert title="Success" severity="success"> + <Alert title={"Success" as TranslatedString} severity="success"> this is an success </Alert> - <Alert title="Info" severity="info"> + <Alert title={"Info" as TranslatedString} severity="info"> this is an info </Alert> </Wrapper> @@ -74,16 +75,32 @@ const showSomething = async function (): Promise<void> { export const WithAction = (): VNode => ( <Wrapper> - <Alert title="Warning" severity="warning" onClose={showSomething}> + <Alert + title={"Warning" as TranslatedString} + severity="warning" + onClose={showSomething} + > this is an warning </Alert> - <Alert title="Error" severity="error" onClose={showSomething}> + <Alert + title={"Error" as TranslatedString} + severity="error" + onClose={showSomething} + > this is an error </Alert> - <Alert title="Success" severity="success" onClose={showSomething}> + <Alert + title={"Success" as TranslatedString} + severity="success" + onClose={showSomething} + > this is an success </Alert> - <Alert title="Info" severity="info" onClose={showSomething}> + <Alert + title={"Info" as TranslatedString} + severity="info" + onClose={showSomething} + > this is an info </Alert> </Wrapper> |