zigap-utils 0.0.24 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/dist/components/AddressProvideQR/AddressProvideQR.d.ts +1 -1
- package/dist/components/AddressProvideQR/AddressProvideQR.types.d.ts +2 -6
- package/dist/components/LoginQR/LoginQR.d.ts +1 -1
- package/dist/components/LoginQR/LoginQR.types.d.ts +8 -5
- package/dist/index.cjs.js +11 -11
- package/dist/index.es.js +771 -764
- package/package.json +1 -1
- package/dist/zigap-icon.svg +0 -9
package/README.md
CHANGED
|
@@ -49,17 +49,19 @@ const App = () => {
|
|
|
49
49
|
| `bgColor` | false | string | #fff | background color |
|
|
50
50
|
| `fgColor` | false | string | #000 | foreground color |
|
|
51
51
|
| `style` | false | CSSProperties | | custom css style |
|
|
52
|
+
| `isShowLogo` | false | boolean | true | Zigap logo in the middle of the QR code |
|
|
52
53
|
|
|
53
54
|
<br>
|
|
54
55
|
|
|
55
56
|
### `AddressProvideQR` props
|
|
56
57
|
|
|
57
|
-
| prop
|
|
58
|
-
|
|
|
59
|
-
| `dapp`
|
|
60
|
-
| `validTime`
|
|
61
|
-
| `onReceive`
|
|
62
|
-
| `size`
|
|
63
|
-
| `bgColor`
|
|
64
|
-
| `fgColor`
|
|
65
|
-
| `style`
|
|
58
|
+
| prop | required | type | default value | description |
|
|
59
|
+
| ------------ | :------: | --------------- | ------------- | --------------------------------------- |
|
|
60
|
+
| `dapp` | true | string | | Name of the dapp to use |
|
|
61
|
+
| `validTime` | true | number | | QR code valid time(minutes) |
|
|
62
|
+
| `onReceive` | true | (value) => void | | Function called after login request |
|
|
63
|
+
| `size` | false | number | 128 | canvas width |
|
|
64
|
+
| `bgColor` | false | string | #fff | background color |
|
|
65
|
+
| `fgColor` | false | string | #000 | foreground color |
|
|
66
|
+
| `style` | false | CSSProperties | | custom css style |
|
|
67
|
+
| `isShowLogo` | false | boolean | true | Zigap logo in the middle of the QR code |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AddressProvideQRProps } from './AddressProvideQR.types';
|
|
2
2
|
|
|
3
|
-
declare const AddressProvideQR: ({ dapp, validTime, onReceive, ...props }: AddressProvideQRProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const AddressProvideQR: ({ dapp, validTime, onReceive, isShowLogo, ...props }: AddressProvideQRProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default AddressProvideQR;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommonStyleType } from 'src/components/LoginQR/LoginQR.types';
|
|
2
2
|
|
|
3
3
|
export type AddressProvideResultType = {
|
|
4
4
|
isSuccess: boolean;
|
|
@@ -8,8 +8,4 @@ export type AddressProvideQRProps = {
|
|
|
8
8
|
dapp: string;
|
|
9
9
|
validTime: number;
|
|
10
10
|
onReceive: (result: AddressProvideResultType) => void;
|
|
11
|
-
|
|
12
|
-
bgColor?: string;
|
|
13
|
-
fgColor?: string;
|
|
14
|
-
style?: CSSProperties;
|
|
15
|
-
};
|
|
11
|
+
} & CommonStyleType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { LoginQRProps } from './LoginQR.types';
|
|
2
2
|
|
|
3
|
-
declare const LoginQR: ({ dapp, sigMessage, validTime, onReceive, ...props }: LoginQRProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const LoginQR: ({ dapp, sigMessage, validTime, onReceive, isShowLogo, ...props }: LoginQRProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default LoginQR;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
|
|
3
|
+
export type CommonStyleType = {
|
|
4
|
+
size?: number;
|
|
5
|
+
bgColor?: string;
|
|
6
|
+
fgColor?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
isShowLogo?: boolean;
|
|
9
|
+
};
|
|
3
10
|
export type LoginResultType = {
|
|
4
11
|
isSuccess: boolean;
|
|
5
12
|
address?: string;
|
|
@@ -9,8 +16,4 @@ export type LoginQRProps = {
|
|
|
9
16
|
sigMessage: string;
|
|
10
17
|
validTime: number;
|
|
11
18
|
onReceive: (result: LoginResultType) => void;
|
|
12
|
-
|
|
13
|
-
bgColor?: string;
|
|
14
|
-
fgColor?: string;
|
|
15
|
-
style?: CSSProperties;
|
|
16
|
-
};
|
|
19
|
+
} & CommonStyleType;
|