@onehat/ui 0.2.14 → 0.2.16
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onehat/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16",
|
|
4
4
|
"description": "Base UI for OneHat apps",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"react-color": "^2.19.3",
|
|
33
33
|
"react-datetime": "^3.2.0",
|
|
34
34
|
"react-draggable": "^4.4.5",
|
|
35
|
+
"react-native-draggable": "^3.3.0",
|
|
35
36
|
"react-dom": "*",
|
|
36
37
|
"react-native": "*"
|
|
37
38
|
},
|
|
@@ -50,7 +50,8 @@ const
|
|
|
50
50
|
setRadioes(radios);
|
|
51
51
|
}, [value]);
|
|
52
52
|
|
|
53
|
-
return <Radio.Group onChange={props.setValue} accessibilityLabel={props.name} ref={props.outerRef} {...props}>
|
|
53
|
+
// return <Radio.Group onChange={props.setValue} accessibilityLabel={props.name} ref={props.outerRef} {...props}> // RadioGroup from NativeBase doesn't yet allow refs
|
|
54
|
+
return <Radio.Group onChange={props.setValue} accessibilityLabel={props.name} {...props}>
|
|
54
55
|
{radios}
|
|
55
56
|
</Radio.Group>;
|
|
56
57
|
},
|
|
@@ -13,12 +13,15 @@ import {
|
|
|
13
13
|
v4 as uuid,
|
|
14
14
|
} from 'uuid';
|
|
15
15
|
|
|
16
|
-
let
|
|
16
|
+
let DraggableToImport;
|
|
17
17
|
if (CURRENT_MODE === UI_MODE_WEB) {
|
|
18
|
-
|
|
18
|
+
DraggableToImport = 'react-draggable'; // https://github.com/react-grid-layout/react-draggable
|
|
19
19
|
} else if (CURRENT_MODE === UI_MODE_REACT_NATIVE) {
|
|
20
|
-
|
|
20
|
+
DraggableToImport = 'react-native-draggable'; // https://github.com/tongyy/react-native-draggable
|
|
21
21
|
}
|
|
22
|
+
const Draggable = await import(DraggableToImport);
|
|
23
|
+
|
|
24
|
+
|
|
22
25
|
|
|
23
26
|
// Note on modes:
|
|
24
27
|
// HORIZONTAL means the component moves along the X axis.
|