From a994009d2f094c4d9c12da68dac3abb28bdef4b3 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Tue, 16 Nov 2021 13:59:53 -0300
Subject: reserveCreated new design

---
 packages/taler-wallet-webextension/src/renderHtml.tsx | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

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

diff --git a/packages/taler-wallet-webextension/src/renderHtml.tsx b/packages/taler-wallet-webextension/src/renderHtml.tsx
index 9c2a794dd..15986d5d1 100644
--- a/packages/taler-wallet-webextension/src/renderHtml.tsx
+++ b/packages/taler-wallet-webextension/src/renderHtml.tsx
@@ -28,13 +28,13 @@ import {
   Amounts,
   amountFractionalBase,
 } from "@gnu-taler/taler-util";
-import { Component, ComponentChildren, JSX, h } from "preact";
+import { Component, ComponentChildren, h, VNode } from "preact";
 
 /**
  * Render amount as HTML, which non-breaking space between
  * decimal value and currency.
  */
-export function renderAmount(amount: AmountJson | string): JSX.Element {
+export function renderAmount(amount: AmountJson | string): VNode {
   let a;
   if (typeof amount === "string") {
     a = Amounts.parse(amount);
@@ -56,13 +56,13 @@ export const AmountView = ({
   amount,
 }: {
   amount: AmountJson | string;
-}): JSX.Element => renderAmount(amount);
+}): VNode => renderAmount(amount);
 
 /**
  * Abbreviate a string to a given length, and show the full
  * string on hover as a tooltip.
  */
-export function abbrev(s: string, n = 5): JSX.Element {
+export function abbrev(s: string, n = 5): VNode {
   let sAbbrev = s;
   if (s.length > n) {
     sAbbrev = s.slice(0, n) + "..";
@@ -92,7 +92,7 @@ export class Collapsible extends Component<CollapsibleProps, CollapsibleState> {
     super(props);
     this.state = { collapsed: props.initiallyCollapsed };
   }
-  render(): JSX.Element {
+  render(): VNode {
     const doOpen = (e: any): void => {
       this.setState({ collapsed: false });
       e.preventDefault();
@@ -132,19 +132,19 @@ interface ExpanderTextProps {
 /**
  * Show a heading with a toggle to show/hide the expandable content.
  */
-export function ExpanderText({ text }: ExpanderTextProps): JSX.Element {
+export function ExpanderText({ text }: ExpanderTextProps): VNode {
   return <span>{text}</span>;
 }
 
 export interface LoadingButtonProps
-  extends JSX.HTMLAttributes<HTMLButtonElement> {
+  extends h.JSX.HTMLAttributes<HTMLButtonElement> {
   isLoading: boolean;
 }
 
 export function ProgressButton({
   isLoading,
   ...rest
-}: LoadingButtonProps): JSX.Element {
+}: LoadingButtonProps): VNode {
   return (
     <button class="pure-button pure-button-primary" type="button" {...rest}>
       {isLoading ? (
@@ -160,7 +160,8 @@ export function ProgressButton({
 export function PageLink(props: {
   pageName: string;
   children?: ComponentChildren;
-}): JSX.Element {
+}): VNode {
+  // eslint-disable-next-line no-undef
   const url = chrome.extension.getURL(`/static/wallet.html#/${props.pageName}`);
   return (
     <a class="actionLink" href={url} target="_blank" rel="noopener noreferrer">
-- 
cgit v1.2.3

