aboutsummaryrefslogtreecommitdiff
path: root/src/webex/renderHtml.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-31 11:49:36 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-31 11:49:36 +0200
commit5a7269b20db0371535669c0faa7f1814d967b5ca (patch)
treec757d7b441875b745e3d83e8a543785e7b82fc9b /src/webex/renderHtml.tsx
parent5ec344290efd937fa82c0704bc7c204a0bf14c78 (diff)
downloadwallet-core-5a7269b20db0371535669c0faa7f1814d967b5ca.tar.xz
cli refunds
Diffstat (limited to 'src/webex/renderHtml.tsx')
-rw-r--r--src/webex/renderHtml.tsx25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/webex/renderHtml.tsx b/src/webex/renderHtml.tsx
index e4686adee..867fb440f 100644
--- a/src/webex/renderHtml.tsx
+++ b/src/webex/renderHtml.tsx
@@ -316,3 +316,28 @@ export class ExpanderText extends ImplicitStateComponent<ExpanderTextProps> {
}
}
+
+export interface LoadingButtonProps {
+ loading: boolean;
+}
+
+export function ProgressButton(
+ props:
+ & React.PropsWithChildren<LoadingButtonProps>
+ & React.DetailedHTMLProps<
+ React.ButtonHTMLAttributes<HTMLButtonElement>,
+ HTMLButtonElement
+ >,
+) {
+ return (
+ <button
+ className="pure-button pure-button-primary"
+ type="button"
+ {...props}
+ >
+ {props.loading ? <span><object className="svg-icon svg-baseline" data="/img/spinner-bars.svg" /></span> : null}
+ {" "}
+ {props.children}
+ </button>
+ );
+} \ No newline at end of file