Skip to content

Commit

Permalink
Merge pull request #20 from Clean-Software/develop
Browse files Browse the repository at this point in the history
Merge develop into EventPage
  • Loading branch information
DoginUwU authored Mar 2, 2022
2 parents 3f305bf + feb44fa commit 2fae86e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
12 changes: 8 additions & 4 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useState } from "react";
import Routes from "./navigation";
import { LoadingPage } from "./views";
import { useEffect } from "react";
import { StatusBar } from "expo-status-bar";

const fetchLoading = async () => {
await new Promise((resolve) => setTimeout(resolve, 3000));
Expand All @@ -22,10 +23,13 @@ export default function App() {
}, []);

if (!appLoaded) {
return (
<LoadingPage />
);
return <LoadingPage />;
}

return <Routes />;
return (
<>
<StatusBar style="light" />
<Routes />
</>
);
}
23 changes: 15 additions & 8 deletions components/button/index.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
import { TouchableOpacity } from "react-native";
import { StyleProp, TouchableOpacity, ViewStyle } from "react-native";
import { SvgUri } from "react-native-svg";
import styles from "./styles";

interface ButtonProps {
image: string;
onPress?: () => void;
backgroundColor?: string;
size?: number;
interface ButtonProps {
image: string;
onPress?: () => void;
backgroundColor?: string;
size?: number;
style?: StyleProp<ViewStyle>;
}

const Button = ({ onPress, image, backgroundColor, size = 40 }: ButtonProps) => {
const Button = ({
onPress,
image,
backgroundColor,
size = 40,
style,
}: ButtonProps) => {
return (
<TouchableOpacity
style={styles(size, backgroundColor).button}
style={[styles(size, backgroundColor).button, style]}
onPress={onPress}
>
<SvgUri width={size} height={size} uri={image} />
Expand Down
3 changes: 1 addition & 2 deletions components/button/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ const styles = (size: number, backgroundColor?: string) =>
button: {
backgroundColor,
borderRadius: 16,
padding: 6,
marginTop: 40,
padding: 6
}
});

Expand Down
2 changes: 1 addition & 1 deletion views/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function Home() {
<SvgUri style={styles.person} uri={personSvg} />
</View>
<Navbar />
<Button image={arrowWhiteSvg} backgroundColor="#FF5100" />
<Button image={arrowWhiteSvg} backgroundColor="#FF5100" style={{ marginTop: 40 }} />
</SafeAreaView>
);
}

0 comments on commit 2fae86e

Please sign in to comment.