Skip to content

Commit ff3ca51

Browse files
authored
fix: visible state (#115)
* fix: visible state * fix: tsc compliation types
1 parent a99a04f commit ff3ca51

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

lib/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ const Spinner = ({ cancelable = false, color = 'white', animation = 'none', over
1212
close();
1313
}
1414
};
15+
React.useEffect(() => {
16+
setSpinnerVisibility(visible);
17+
}, [visible]);
1518
const _renderDefaultContent = () => {
1619
return (React.createElement(View, { style: styles.background },
1720
customIndicator || (React.createElement(ActivityIndicator, { color: color, size: size, style: [styles.activityIndicator, { ...indicatorStyle }] })),

src/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ const Spinner = ({
5050
}
5151
}
5252

53+
React.useEffect(() => {
54+
setSpinnerVisibility(visible)
55+
}, [visible])
5356
const _renderDefaultContent = () => {
5457
return (
5558
<View style={styles.background}>

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6438,7 +6438,7 @@ remark-heading-gap@^3.0.0:
64386438
resolved "https://registry.yarnpkg.com/remark-heading-gap/-/remark-heading-gap-3.1.2.tgz#480b71a655e793848db42b714358b5533d7d5ec3"
64396439
integrity sha512-LNm1B4UveH1BkSLx4OPab0vW/p3KOc+8wV4kd94CHXmhuJ8i+kdroG2AonkUVzbOElc8U8ylxF3WPfmqYbRjJg==
64406440

6441-
"remark-license@github:niftylettuce/remark-license":
6441+
remark-license@niftylettuce/remark-license:
64426442
version "4.0.1"
64436443
resolved "https://codeload.github.com/niftylettuce/remark-license/tar.gz/17ecb8f64f8f6082414d14f9267a12764e6ddbfb"
64446444
dependencies:

0 commit comments

Comments
 (0)