summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-03-29 00:45:17 -0300
committerSebastian <sebasjm@gmail.com>2022-03-29 00:45:17 -0300
commitbe489b6b3ea4214f546dfc33d6bb0f39ce82b5ab (patch)
tree3b95934921172f58535ac83a58aabdf6f092929e /packages/taler-wallet-webextension/src
parent47f51ced7f6180fcb6a7cf2f543cbb7782383fab (diff)
downloadwallet-core-be489b6b3ea4214f546dfc33d6bb0f39ce82b5ab.tar.gz
wallet-core-be489b6b3ea4214f546dfc33d6bb0f39ce82b5ab.tar.bz2
wallet-core-be489b6b3ea4214f546dfc33d6bb0f39ce82b5ab.zip
remove storybook
Diffstat (limited to 'packages/taler-wallet-webextension/src')
-rw-r--r--packages/taler-wallet-webextension/src/NavigationBar.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/components/Banner.stories.tsx10
-rw-r--r--packages/taler-wallet-webextension/src/components/Banner.tsx2
-rw-r--r--packages/taler-wallet-webextension/src/components/index.stories.tsx25
-rw-r--r--packages/taler-wallet-webextension/src/stories.tsx9
5 files changed, 38 insertions, 10 deletions
diff --git a/packages/taler-wallet-webextension/src/NavigationBar.tsx b/packages/taler-wallet-webextension/src/NavigationBar.tsx
index 8b545b981..df779cae3 100644
--- a/packages/taler-wallet-webextension/src/NavigationBar.tsx
+++ b/packages/taler-wallet-webextension/src/NavigationBar.tsx
@@ -75,7 +75,6 @@ export function PopupNavBar({ path = "" }: { path?: string }): VNode {
<a href="/backup" class={path.startsWith("/backup") ? "active" : ""}>
<i18n.Translate>Backup</i18n.Translate>
</a>
- <a />
<a href="/settings">
<SvgIcon
title={i18n.str`Settings`}
@@ -105,7 +104,6 @@ export function WalletNavBar({ path = "" }: { path?: string }): VNode {
</a>
</JustInDevMode>
- <a />
<a
href="/settings"
class={path.startsWith("/settings") ? "active" : ""}
diff --git a/packages/taler-wallet-webextension/src/components/Banner.stories.tsx b/packages/taler-wallet-webextension/src/components/Banner.stories.tsx
index e4fc63ac1..f023e0d83 100644
--- a/packages/taler-wallet-webextension/src/components/Banner.stories.tsx
+++ b/packages/taler-wallet-webextension/src/components/Banner.stories.tsx
@@ -19,18 +19,18 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
-import { Banner } from "./Banner.js";
import { Fragment, h, VNode } from "preact";
import { Avatar } from "../mui/Avatar.js";
-import { Icon, SvgIcon } from "./styled/index.js";
import { Typography } from "../mui/Typography.js";
-
+import { Banner } from "./Banner.js";
+import { SvgIcon } from "./styled/index.js";
+import wifiIcon from "../svg/wifi.svg";
export default {
title: "mui/banner",
component: Banner,
};
-function Wrapper({ children }: any) {
+function Wrapper({ children }: any): VNode {
return (
<div
style={{
@@ -48,7 +48,7 @@ function Wrapper({ children }: any) {
);
}
function SignalWifiOffIcon({ ...rest }: any): VNode {
- return <SvgIcon {...rest} />;
+ return <SvgIcon {...rest} dangerouslySetInnerHTML={{ __html: wifiIcon }} />;
}
export const BasicExample = () => (
diff --git a/packages/taler-wallet-webextension/src/components/Banner.tsx b/packages/taler-wallet-webextension/src/components/Banner.tsx
index 7bbacee8d..88b36430b 100644
--- a/packages/taler-wallet-webextension/src/components/Banner.tsx
+++ b/packages/taler-wallet-webextension/src/components/Banner.tsx
@@ -19,7 +19,7 @@ interface Props extends JSX.HTMLAttributes<HTMLDivElement> {
};
}
-export function Banner({ title, elements, confirm, ...rest }: Props) {
+export function Banner({ title, elements, confirm, ...rest }: Props): VNode {
return (
<Fragment>
<Paper elevation={0} {...rest}>
diff --git a/packages/taler-wallet-webextension/src/components/index.stories.tsx b/packages/taler-wallet-webextension/src/components/index.stories.tsx
new file mode 100644
index 000000000..7cf9d4c58
--- /dev/null
+++ b/packages/taler-wallet-webextension/src/components/index.stories.tsx
@@ -0,0 +1,25 @@
+/*
+ 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 <http://www.gnu.org/licenses/>
+ */
+
+/**
+ *
+ * @author Sebastian Javier Marchano (sebasjm)
+ */
+
+import * as a1 from "./Banner.stories.js";
+import * as a2 from "./PendingTransactions.stories.js";
+
+export default [a1, a2];
diff --git a/packages/taler-wallet-webextension/src/stories.tsx b/packages/taler-wallet-webextension/src/stories.tsx
index 531425bc9..10c903ae6 100644
--- a/packages/taler-wallet-webextension/src/stories.tsx
+++ b/packages/taler-wallet-webextension/src/stories.tsx
@@ -35,8 +35,13 @@ import * as mui from "./mui/index.stories.js";
import { PopupNavBar, WalletNavBar } from "./NavigationBar.js";
import * as popup from "./popup/index.stories.js";
import * as wallet from "./wallet/index.stories.js";
+import * as components from "./components/index.stories.js";
+import { strings } from "./i18n/strings.js";
-setupI18n("en", { en: {} });
+const url = new URL(window.location.href);
+const lang = url.searchParams.get("lang") || "en";
+
+setupI18n(lang, strings);
const Page = styled.div`
* {
@@ -107,7 +112,7 @@ function parseExampleImport(group: string, im: any): ComponentItem {
};
}
-const allExamples = Object.entries({ popup, wallet, mui }).map(
+const allExamples = Object.entries({ popup, wallet, mui, components }).map(
([title, value]) => ({
title,
list: value.default.map((s) => parseExampleImport(title, s)),