From a30a547ac5596c787252ce23a845093c426dc2ef Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 5 Apr 2022 12:16:09 -0300 Subject: mui alert and not enough blanance ported to material --- .../src/mui/Alert.stories.tsx | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 packages/taler-wallet-webextension/src/mui/Alert.stories.tsx (limited to 'packages/taler-wallet-webextension/src/mui/Alert.stories.tsx') diff --git a/packages/taler-wallet-webextension/src/mui/Alert.stories.tsx b/packages/taler-wallet-webextension/src/mui/Alert.stories.tsx new file mode 100644 index 000000000..12b2a8625 --- /dev/null +++ b/packages/taler-wallet-webextension/src/mui/Alert.stories.tsx @@ -0,0 +1,86 @@ +/* + This file is part of GNU Taler + (C) 2021 Taler Systems S.A. + + GNU Taler is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + GNU Taler; see the file COPYING. If not, see + */ + +/** + * + * @author Sebastian Javier Marchano (sebasjm) + */ + +import { css } from "@linaria/core"; +import { ComponentChildren, Fragment, h, VNode } from "preact"; +import { Alert } from "./Alert.jsx"; + +export default { + title: "mui/alert", + component: Alert, +}; + +function Wrapper({ children }: { children: ComponentChildren }): VNode { + return ( +
* { + margin: 2em; + } + `} + > + {children} +
+ ); +} + +export const BasicExample = (): VNode => ( + + this is an warning + this is an error + this is an success + this is an info + +); + +export const WithTitle = (): VNode => ( + + + this is an warning + + + this is an error + + + this is an success + + + this is an info + + +); + +export const WithAction = (): VNode => ( + + alert("closed")}> + this is an warning + + alert("closed")}> + this is an error + + alert("closed")}> + this is an success + + alert("closed")}> + this is an info + + +); -- cgit v1.2.3