Skip to content

Commit

Permalink
feat: onboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammed Kaplan committed Oct 21, 2023
1 parent 8b5c7b9 commit f61d297
Show file tree
Hide file tree
Showing 18 changed files with 209 additions and 585 deletions.
140 changes: 140 additions & 0 deletions .tamagui/tamagui.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -46629,6 +46629,76 @@
"name": "color-192",
"val": "hsl(53, 100%, 91.0%)",
"variable": ""
},
"primary": {
"isVar": true,
"key": "$primary",
"name": "color-193",
"val": "#8370f6",
"variable": ""
},
"secondary": {
"isVar": true,
"key": "$secondary",
"name": "color-194",
"val": "#8370f6",
"variable": ""
},
"blue": {
"isVar": true,
"key": "$blue",
"name": "color-195",
"val": "#8caeff",
"variable": ""
},
"gray": {
"isVar": true,
"key": "$gray",
"name": "color-196",
"val": "#808080",
"variable": ""
},
"green": {
"isVar": true,
"key": "$green",
"name": "color-197",
"val": "#008000",
"variable": ""
},
"orange": {
"isVar": true,
"key": "$orange",
"name": "color-198",
"val": "#fcc688",
"variable": ""
},
"pink": {
"isVar": true,
"key": "$pink",
"name": "color-199",
"val": "#c498f9",
"variable": ""
},
"purple": {
"isVar": true,
"key": "$purple",
"name": "color-200",
"val": "#c498f9",
"variable": ""
},
"red": {
"isVar": true,
"key": "$red",
"name": "color-201",
"val": "#ff4d4d",
"variable": ""
},
"yellow": {
"isVar": true,
"key": "$yellow",
"name": "color-202",
"val": "#c498f9",
"variable": ""
}
},
"radius": {
Expand Down Expand Up @@ -48837,6 +48907,76 @@
"val": "hsl(53, 100%, 91.0%)",
"variable": ""
},
"$color.primary": {
"isVar": true,
"key": "$primary",
"name": "color-193",
"val": "#8370f6",
"variable": ""
},
"$color.secondary": {
"isVar": true,
"key": "$secondary",
"name": "color-194",
"val": "#8370f6",
"variable": ""
},
"$color.blue": {
"isVar": true,
"key": "$blue",
"name": "color-195",
"val": "#8caeff",
"variable": ""
},
"$color.gray": {
"isVar": true,
"key": "$gray",
"name": "color-196",
"val": "#808080",
"variable": ""
},
"$color.green": {
"isVar": true,
"key": "$green",
"name": "color-197",
"val": "#008000",
"variable": ""
},
"$color.orange": {
"isVar": true,
"key": "$orange",
"name": "color-198",
"val": "#fcc688",
"variable": ""
},
"$color.pink": {
"isVar": true,
"key": "$pink",
"name": "color-199",
"val": "#c498f9",
"variable": ""
},
"$color.purple": {
"isVar": true,
"key": "$purple",
"name": "color-200",
"val": "#c498f9",
"variable": ""
},
"$color.red": {
"isVar": true,
"key": "$red",
"name": "color-201",
"val": "#ff4d4d",
"variable": ""
},
"$color.yellow": {
"isVar": true,
"key": "$yellow",
"name": "color-202",
"val": "#c498f9",
"variable": ""
},
"$radius.0": {
"isVar": true,
"key": "$0",
Expand Down
122 changes: 41 additions & 81 deletions app/index.tsx
Original file line number Diff line number Diff line change
@@ -1,91 +1,51 @@
import { Github, Twitter } from "@tamagui/lucide-icons";
import { Link, Redirect, useRouter } from "expo-router";
import {
Button,
H1,
ListItem,
Paragraph,
Separator,
YGroup,
YStack
} from "tamagui";
import { useAssets } from "expo-asset";
import { Image, styled, Text, View } from "tamagui";

import { MyStack } from "../components/MyStack";
import { Button } from "@/components/Button";

const Logo = styled(Image, {
marginTop: "$-5",
alignSelf: "center",
backgroundColor: "white",
borderRadius: "$10",
p: "$7",
source: {}
});

const LogoBackground = styled(View, {
bg: "$primary",
height: "$20",
borderBottomLeftRadius: 100,
borderBottomRightRadius: 100
});

export default function Home() {
const router = useRouter();
const [assets] = useAssets([require("@/assets/logo-icon.png")]);

return <Redirect href="/sign-in" />;
return (
<MyStack>
<YStack
space="$4"
maxWidth={600}
>
<H1 textAlign="center">Welcome to Tamagui.</H1>
<Paragraph textAlign="center">
Here&apos;s a basic starter to show navigating from one screen to
another.
</Paragraph>
</YStack>
<View flex={1}>
<LogoBackground />

<YStack space="$2.5">
<Button onPress={() => router.push("/users/testuser")}>
Go to user page
</Button>
<Button onPress={() => router.push("/tabs")}>Go to tabs page</Button>
</YStack>
{assets ? <Logo source={assets[0]} /> : null}

<YStack space="$5">
<YGroup
bordered
separator={<Separator />}
theme="green"
<View
flex={1}
justifyContent="space-around"
>
<View
alignContent="center"
alignItems="center"
>
<Text fontSize="$10">Scan & Go</Text>
<Text>A platform build for a new way of communicating</Text>
</View>
<Button
bg="$secondary"
m="$10"
>
<YGroup.Item>
<Link
asChild
href="https://twitter.com/natebirdman"
target="_blank"
>
<ListItem
hoverTheme
title="Nate"
pressTheme
icon={Twitter}
/>
</Link>
</YGroup.Item>
<YGroup.Item>
<Link
asChild
href="https://github.com/tamagui/tamagui"
target="_blank"
>
<ListItem
hoverTheme
pressTheme
title="Tamagui"
icon={Github}
/>
</Link>
</YGroup.Item>
<YGroup.Item>
<Link
asChild
href="https://github.com/ivopr/tamagui-expo"
target="_blank"
>
<ListItem
hoverTheme
pressTheme
title="This Template"
icon={Github}
/>
</Link>
</YGroup.Item>
</YGroup>
</YStack>
</MyStack>
Fortsätt
</Button>
</View>
</View>
);
}
2 changes: 1 addition & 1 deletion app/sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const CustomKeyboardAvoidingView = styled(KeyboardAvoidingView, {
});

export default function SignInView() {
const [assets, error] = useAssets([require("@/assets/logo.png")]);
const [assets] = useAssets([require("@/assets/logo.png")]);

return (
<View
Expand Down
60 changes: 0 additions & 60 deletions app/tabs/_layout.tsx

This file was deleted.

38 changes: 0 additions & 38 deletions app/tabs/tab1.tsx

This file was deleted.

Loading

0 comments on commit f61d297

Please sign in to comment.