From 24cac493dded00ef40e0e30a0d2263e4f35c3e29 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Wed, 4 Jan 2023 11:24:58 -0300
Subject: fix #7522

---
 .../src/components/Banner.tsx                      | 40 ++++++----------------
 1 file changed, 11 insertions(+), 29 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/components/Banner.tsx')

diff --git a/packages/taler-wallet-webextension/src/components/Banner.tsx b/packages/taler-wallet-webextension/src/components/Banner.tsx
index f95647d42..a91fd384f 100644
--- a/packages/taler-wallet-webextension/src/components/Banner.tsx
+++ b/packages/taler-wallet-webextension/src/components/Banner.tsx
@@ -13,21 +13,20 @@
  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/>
  */
-import { h, Fragment, VNode, JSX } from "preact";
-import { Divider } from "../mui/Divider.js";
+import { ComponentChildren, Fragment, h, JSX, VNode } from "preact";
 import { Button } from "../mui/Button.js";
-import { Typography } from "../mui/Typography.js";
-import { Avatar } from "../mui/Avatar.js";
+import { Divider } from "../mui/Divider.js";
 import { Grid } from "../mui/Grid.js";
 import { Paper } from "../mui/Paper.js";
 
 interface Props extends JSX.HTMLAttributes<HTMLDivElement> {
   titleHead?: VNode;
-  elements: {
-    icon?: VNode;
-    description: VNode;
-    action?: () => void;
-  }[];
+  children: ComponentChildren;
+  // elements: {
+  //   icon?: VNode;
+  //   description: VNode;
+  //   action?: () => void;
+  // }[];
   confirm?: {
     label: string;
     action: () => Promise<void>;
@@ -36,8 +35,9 @@ interface Props extends JSX.HTMLAttributes<HTMLDivElement> {
 
 export function Banner({
   titleHead,
-  elements,
+  children,
   confirm,
+  href,
   ...rest
 }: Props): VNode {
   return (
@@ -49,25 +49,7 @@ export function Banner({
           </Grid>
         )}
         <Grid container columns={1}>
-          {elements.map((e, i) => (
-            <Grid
-              container
-              item
-              xs={1}
-              key={i}
-              wrap="nowrap"
-              spacing={1}
-              alignItems="center"
-              onClick={e.action}
-            >
-              {e.icon && (
-                <Grid item xs={"auto"}>
-                  <Avatar>{e.icon}</Avatar>
-                </Grid>
-              )}
-              <Grid item>{e.description}</Grid>
-            </Grid>
-          ))}
+          {children}
         </Grid>
         {confirm && (
           <Grid container justifyContent="flex-end" spacing={8}>
-- 
cgit v1.2.3

