@hoddy-ui/next 2.0.33 → 2.0.35

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/dist/index.mjs CHANGED
@@ -467,25 +467,22 @@ var AdaptiveStatusBar = ({ translucent = false }) => {
467
467
  const [focused, setFocused] = useState2(false);
468
468
  const colors2 = useColors();
469
469
  const theme = useTheme();
470
+ const statusbarHandler = () => {
471
+ StatusBar.setBarStyle(theme === "dark" ? "light-content" : "dark-content");
472
+ if (Platform3.OS === "android") {
473
+ StatusBar.setBackgroundColor(
474
+ translucent ? "transparent" : colors2.white[1]
475
+ );
476
+ StatusBar.setTranslucent(true);
477
+ }
478
+ };
470
479
  useFocusEffect(
471
480
  React5.useCallback(() => {
472
- StatusBar.setBarStyle(
473
- theme === "dark" ? "light-content" : "dark-content"
474
- );
475
- if (Platform3.OS === "android") {
476
- StatusBar.setBackgroundColor(
477
- colors2.white[1] + (translucent ? "0" : "")
478
- );
479
- StatusBar.setTranslucent(true);
480
- }
481
+ statusbarHandler();
481
482
  }, [theme])
482
483
  );
483
484
  React5.useEffect(() => {
484
- StatusBar.setBarStyle(theme === "dark" ? "light-content" : "dark-content");
485
- if (Platform3.OS === "android") {
486
- StatusBar.setBackgroundColor(colors2.white[1] + (translucent ? "0" : ""));
487
- StatusBar.setTranslucent(true);
488
- }
485
+ statusbarHandler();
489
486
  }, [theme]);
490
487
  return /* @__PURE__ */ React5.createElement(React5.Fragment, null);
491
488
  };