Skip to content

Commit

Permalink
fix: Fixed some bugs in the screen component
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit Agrawal committed Dec 11, 2023
1 parent d5c5b84 commit 606cd3a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 34 deletions.
31 changes: 4 additions & 27 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// import "./wdyr";
import React, { useState } from "react";
import {
useFonts,
Expand Down Expand Up @@ -39,37 +38,15 @@ import IconDemo from "./demo/components/icon-demo";
import ImageDemo from "./demo/components/image-demo";
import AvatarDemo from "./demo/components/avatar-demo";
import VideoDemo from "./demo/components/video-demo";
import Fade from "./src/components/atoms/fade/fade";
import Grid from "./src/components/atoms/grid/grid";
import ScaleFade from "./src/components/atoms/scale-fade/scale-fade";
import Slide from "./src/components/atoms/slide/slide";
import SlideFade from "./src/components/atoms/slide-fade/slide-fade";
import Collapse from "./src/components/atoms/collapse/collapse";
import Spinner from "./src/components/atoms/spinner/spinner";
import Video from "./src/components/molecules/video/video";
import Image from "./src/components/molecules/image/image";
import Radio from "./src/components/molecules/radio/radio";
import RadioGroup from "./src/components/molecules/radio/radio-group";
import CheckBox from "./src/components/molecules/checkbox/checkbox";
import CheckBoxGroup from "./src/components/molecules/checkbox/checkbox-group";
import Textarea from "./src/components/molecules/textarea/textarea";
import Input from "./src/components/molecules/input/input";
import Stack, { HStack } from "./src/components/atoms/stack/stack";
import Button from "./src/components/molecules/button/button";
import Switch from "./src/components/molecules/switch/switch";
import IconButton from "./src/components/molecules/icon-button/icon-button";
import Progress from "./src/components/molecules/progress/progress";
import Skeleton from "./src/components/atoms/skeleton/skeleton";
import SkeletonCircle from "./src/components/atoms/skeleton/skeleton-circle";
import ButtonGroup from "./src/components/molecules/button/button-group";
import Box from "./src/components/atoms/box/box";
import { FlatList, ScrollView } from "react-native";
import { NativeModules } from "react-native";
import { Avatar, Divider, useTheme } from "./src";
import { useTheme } from "./src";

if (__DEV__) {
NativeModules.DevSettings.setIsDebuggingRemotely(true);
}
// if (__DEV__) {
// NativeModules.DevSettings.setIsDebuggingRemotely(true);
// }

const App = () => {
const [haveFontsLoaded] = useFonts({
Expand Down
14 changes: 7 additions & 7 deletions src/components/Atoms/Screen/Screen.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState } from "react";
import { BoxProps } from "../box/box";
import { StatusBar, RefreshControl, Platform } from "react-native";
import { StatusBar, RefreshControl, RefreshControlProps } from "react-native";
import {
KeyboardAwareScrollView,
KeyboardAwareScrollViewProps,
Expand Down Expand Up @@ -44,7 +44,7 @@ export type BaseScreenProps = Omit<
/** The background color of the refresh indicator */
refreshProgressViewOffset?: number;
/** Size of the refresh indicator (Android only) */
refreshIndicatorSize?: "default" | "large";
refreshIndicatorSize?: RefreshControlProps["size"];
/** The color of the refresh indicator (iOS only) */
refreshTintColor?: string;
/** The title displayed under the refresh indicator (iOS only) */
Expand Down Expand Up @@ -129,7 +129,7 @@ const CustomScreen = React.memo(
colors={refreshIndicatorColors}
progressBackgroundColor={refreshProgressBackgroundColor}
progressViewOffset={refreshProgressViewOffset}
size={refreshIndicatorSize === "large" ? 0 : 1}
size={refreshIndicatorSize}
tintColor={refreshTintColor}
title={refreshTitle}
titleColor={refreshTitleColor}
Expand All @@ -155,15 +155,15 @@ const CustomScreen = React.memo(
return (
<>
<StatusBar
backgroundColor={((props.style as any) ?? {}).backgroundColor}
backgroundColor={
((animationProps.animate as any) ?? {}).backgroundColor ??
((props.style as any) ?? {}).backgroundColor
}
barStyle={colorMode === "light" ? "dark-content" : "light-content"}
/>
<SafeAreaView
style={{
flex: 1,
backgroundColor: ((props.style as any) ?? {}).backgroundColor,
paddingTop:
Platform.OS === "android" ? StatusBar.currentHeight : 0,
}}
>
{mainView}
Expand Down

0 comments on commit 606cd3a

Please sign in to comment.