@rpcbase/ui 0.9.0 → 0.11.0

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.
@@ -3,7 +3,7 @@ import assert from "assert"
3
3
  import {useEffect, useRef} from "react"
4
4
  import {Animated, StyleSheet, View, ViewStyle} from "react-native"
5
5
 
6
- import {withStyles} from "@ui-kitten/components"
6
+ import {withStyles} from "@ui-kitten/components/theme/theme/withStyles"
7
7
  import {SpinnerAnimation} from "@ui-kitten/components/ui/spinner/animation"
8
8
 
9
9
 
@@ -0,0 +1,32 @@
1
+ /* @flow */
2
+ import ActivityIndicator from "../ActivityIndicator"
3
+
4
+
5
+ type Props = {
6
+ id?: string,
7
+ className: string,
8
+ disabled: boolean,
9
+ isLoading: boolean,
10
+ onClick: Function,
11
+ }
12
+
13
+ const SubmitButton = ({className = "", id = "btn-submit", ...props}: Props) => (
14
+ <button
15
+ id={id}
16
+ type="submit"
17
+ className={cx("submit-button btn btn-primary fw-bold d-flex flex-row align-items-center", className)}
18
+ disabled={props.disabled || props.isLoading}
19
+ onClick={props.onClick}
20
+ >
21
+ {props.isLoading && (
22
+ <>
23
+ <ActivityIndicator style={{marginRight: 6}} color="#FFF" size={15} />
24
+
25
+ {props.children}
26
+ </>
27
+ )}
28
+ {!props.isLoading && <>{props.children}</>}
29
+ </button>
30
+ )
31
+
32
+ export default SubmitButton
package/package.json CHANGED
@@ -1,10 +1,15 @@
1
1
  {
2
2
  "name": "@rpcbase/ui",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "license": "SSPL-1.0",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
7
7
  },
8
+ "files": [
9
+ "**/*.js",
10
+ "!**/*.test.js",
11
+ "!.wireit/**"
12
+ ],
8
13
  "scripts": {
9
14
  "test": "echo \"Error: no test specified\" && exit 0"
10
15
  },
@@ -1 +0,0 @@
1
- {"fullyTracked":true,"platform":"linux","arch":"x64","nodeVersion":"v18.19.0","command":"node ../../scripts/prflow/apply-prerelease-versions.js $BRANCH_NAME","extraArgs":[],"clean":true,"files":{"/home/runner/work/rpcbase/rpcbase/pkg/ui/package.json":"d578364719aa21eaec66d1868d2c3438f18fe8aea3e92193be5d96f652a221ed","/home/runner/work/rpcbase/rpcbase/pkg/ui/yarn.lock":"bf588d30310a009850ee4cd09d45e4faa396bd01039d069b29ec7d916f15a080","/home/runner/work/rpcbase/rpcbase/yarn.lock":"6418e6930bf35b3c31e73c88c6bf21b0f4033a3a8a4e6470477cdf77088e96f1"},"output":[],"dependencies":{},"env":{"BRANCH_NAME":"master"}}
File without changes
File without changes