kiva-protocol-ui-kit 1.0.51 → 1.0.52

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,8 @@
1
- import { FunctionComponent } from "react";
1
+ import { FunctionComponent, MouseEventHandler } from "react";
2
2
  import "./Button.scss";
3
3
  export interface ButtonProps {
4
4
  title: string;
5
5
  style: string;
6
+ onClick?: MouseEventHandler<HTMLButtonElement>;
6
7
  }
7
8
  export declare const Button: FunctionComponent<ButtonProps>;
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from "react";
1
+ import { FunctionComponent, MouseEventHandler } from "react";
2
2
  import "./ConsentCard.scss";
3
3
  import "../typography.scss";
4
4
  import "../variables.scss";
@@ -7,7 +7,9 @@ export interface ConsentCardProps {
7
7
  title: string;
8
8
  agreement: string;
9
9
  pii: JSX.Element | null;
10
- back: string;
11
- accept: string;
10
+ backBtnHandler?: MouseEventHandler<HTMLButtonElement>;
11
+ backBtnContent: string;
12
+ acceptBtnHandler?: MouseEventHandler<HTMLButtonElement>;
13
+ acceptBtnContent: string;
12
14
  }
13
15
  export declare const ConsentCard: FunctionComponent<ConsentCardProps>;
@@ -48,7 +48,7 @@ var css_248z$7 = "button{background-color:#004fd4!important;border-radius:16px!i
48
48
  styleInject(css_248z$7);
49
49
 
50
50
  var Button = function (prop) {
51
- return (React.createElement("button", { type: "button", className: "btn btn-primary" }, prop.title));
51
+ return (React.createElement("button", { type: "button", className: "btn btn-primary", onClick: prop.onClick }, prop.title));
52
52
  };
53
53
 
54
54
  var css_248z$6 = ".alert{border-radius:20px;box-shadow:0 0 8px rgba(0,0,0,.08);padding:23.5px 50px}";
@@ -17321,9 +17321,9 @@ var ConsentCard = function (prop) {
17321
17321
  React.createElement("ul", null, lodash.map(prop.pii, function (item) { return React.createElement("li", { className: "pii-list-item" }, item); }))),
17322
17322
  React.createElement("div", { className: "row col-flex" },
17323
17323
  React.createElement("div", { className: "col-sm text-center" },
17324
- React.createElement(Button, { title: prop.back, style: "secondary" })),
17324
+ React.createElement(Button, { title: prop.backBtnContent, style: "secondary", onClick: prop.backBtnHandler })),
17325
17325
  React.createElement("div", { className: "col-sm text-center" },
17326
- React.createElement(Button, { title: prop.accept, style: "primary" })))));
17326
+ React.createElement(Button, { title: prop.acceptBtnContent, style: "primary", onClick: prop.acceptBtnHandler })))));
17327
17327
  };
17328
17328
 
17329
17329
  export { ActionCard, Alert, Button, ConsentCard, FormInput, QrCode };