@draftbit/core 49.6.4 → 49.6.5-080ad8.2
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/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleScrollView.js +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.d.ts +5 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +3 -3
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +1 -1
- package/lib/typescript/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +3 -3
- package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +1 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx +12 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "49.6.
|
|
3
|
+
"version": "49.6.5-080ad8.2+080ad8c",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"types": "lib/typescript/src/index.d.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/theme": "49.6.
|
|
44
|
+
"@draftbit/theme": "^49.6.5-080ad8.2+080ad8c",
|
|
45
45
|
"@expo/vector-icons": "^13.0.0",
|
|
46
46
|
"@gorhom/bottom-sheet": "5.0.0-alpha.7",
|
|
47
47
|
"@material-ui/core": "^4.11.0",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
],
|
|
118
118
|
"testEnvironment": "node"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "080ad8cc72ee61940c3de8378163e73e5c153f15"
|
|
121
121
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ScrollView } from "react-native";
|
|
2
|
+
import { ScrollView, RefreshControl } from "react-native";
|
|
3
3
|
import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
|
|
4
4
|
/**
|
|
5
5
|
* A ScrollView wrapper that takes a single `style` prop and internally extracts
|
|
6
6
|
* the appropriate style keys into the `contentContainerStyle`
|
|
7
7
|
*/
|
|
8
|
-
const SimpleStyleScrollView = React.forwardRef(({ style: styleProp, ...rest }, ref) => {
|
|
8
|
+
const SimpleStyleScrollView = React.forwardRef(({ style: styleProp, onRefresh, refreshing = false, ...rest }, ref) => {
|
|
9
9
|
const { style, contentContainerStyle } = useSplitContentContainerStyles(styleProp);
|
|
10
|
-
return (React.createElement(ScrollView, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, ...rest }));
|
|
10
|
+
return (React.createElement(ScrollView, { ref: ref, style: style, contentContainerStyle: contentContainerStyle, refreshControl: onRefresh ? (React.createElement(RefreshControl, { refreshing: refreshing, onRefresh: onRefresh })) : undefined, ...rest }));
|
|
11
11
|
});
|
|
12
12
|
export default SimpleStyleScrollView;
|
|
13
13
|
//# sourceMappingURL=SimpleStyleScrollView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleStyleScrollView.js","sourceRoot":"","sources":["SimpleStyleScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"SimpleStyleScrollView.js","sourceRoot":"","sources":["SimpleStyleScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAO9E;;;GAGG;AACH,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAC5C,CACE,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,GAAG,KAAK,EAAE,GAAG,IAAI,EAAS,EACnE,GAA0B,EAC1B,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,qBAAqB,EAAE,GACpC,8BAA8B,CAAC,SAAS,CAAC,CAAC;IAE5C,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,qBAAqB,EAC5C,cAAc,EACZ,SAAS,CAAC,CAAC,CAAC,CACV,oBAAC,cAAc,IAAC,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,GAAI,CACjE,CAAC,CAAC,CAAC,SAAS,KAEX,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ScrollView } from "react-native";
|
|
2
|
+
import { ScrollView, RefreshControl } from "react-native";
|
|
3
3
|
import type { ScrollViewProps } from "react-native";
|
|
4
4
|
import useSplitContentContainerStyles from "./useSplitContentContainerStyles";
|
|
5
5
|
|
|
6
|
+
interface Props extends Omit<ScrollViewProps, "contentContainerStyle"> {
|
|
7
|
+
onRefresh?: () => void;
|
|
8
|
+
refreshing?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
6
11
|
/**
|
|
7
12
|
* A ScrollView wrapper that takes a single `style` prop and internally extracts
|
|
8
13
|
* the appropriate style keys into the `contentContainerStyle`
|
|
9
14
|
*/
|
|
10
15
|
const SimpleStyleScrollView = React.forwardRef(
|
|
11
16
|
(
|
|
12
|
-
{
|
|
13
|
-
style: styleProp,
|
|
14
|
-
...rest
|
|
15
|
-
}: Omit<ScrollViewProps, "contentContainerStyle">,
|
|
17
|
+
{ style: styleProp, onRefresh, refreshing = false, ...rest }: Props,
|
|
16
18
|
ref: React.Ref<ScrollView>
|
|
17
19
|
) => {
|
|
18
20
|
const { style, contentContainerStyle } =
|
|
@@ -23,6 +25,11 @@ const SimpleStyleScrollView = React.forwardRef(
|
|
|
23
25
|
ref={ref}
|
|
24
26
|
style={style}
|
|
25
27
|
contentContainerStyle={contentContainerStyle}
|
|
28
|
+
refreshControl={
|
|
29
|
+
onRefresh ? (
|
|
30
|
+
<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
|
|
31
|
+
) : undefined
|
|
32
|
+
}
|
|
26
33
|
{...rest}
|
|
27
34
|
/>
|
|
28
35
|
);
|