Skip to content

Commit 31f5bfd

Browse files
committed
refactor(example-app): ♻️ align buttons
1 parent 03a6739 commit 31f5bfd

File tree

1 file changed

+42
-48
lines changed

1 file changed

+42
-48
lines changed

example/src/pages/AboutScreen.tsx

Lines changed: 42 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const AboutScreen = ({ navigation }) => {
2020
const tailwind = useTheme();
2121

2222
return (
23-
<Box style={tailwind.style("flex-1")}>
23+
<Box style={tailwind.style("flex-1 mx-2 ")}>
2424
<Background color={tailwind.getColor("text-gray-300")} />
2525
<Box
2626
style={tailwind.style(
@@ -39,55 +39,49 @@ const AboutScreen = ({ navigation }) => {
3939
</Text>
4040
</Box>
4141

42-
<Box
43-
style={tailwind.style(
44-
"flex-row flex-wrap justify-center items-center mt-auto",
45-
)}
46-
>
47-
<Box style={tailwind.style("justify-center items-center w-full")}>
48-
<Button
49-
onPress={() => {
50-
navigation.navigate("Components");
51-
}}
52-
size="xl"
53-
>
54-
View Components
55-
</Button>
56-
</Box>
42+
<Box style={tailwind.style("justify-center w-full mt-auto")}>
43+
<Button
44+
onPress={() => {
45+
navigation.navigate("Components");
46+
}}
47+
size="lg"
48+
style={tailwind.style("w-full")}
49+
>
50+
View Components
51+
</Button>
52+
</Box>
53+
54+
<Box style={tailwind.style("flex-row w-full justify-center mt-4")}>
55+
<Button
56+
prefix={
57+
<Icon
58+
icon={<Github fill={tailwind.getColor("text-white-500")} />}
59+
/>
60+
}
61+
onPress={() => {
62+
Linking.openURL(
63+
"https://github.com/adaptui/react-native-tailwind",
64+
);
65+
}}
66+
size="lg"
67+
>
68+
Github
69+
</Button>
5770

58-
<Box
59-
style={tailwind.style(
60-
" flex-row justify-center items-center w-full mt-4",
61-
)}
71+
<Button
72+
prefix={
73+
<Icon
74+
icon={<Dribble fill={tailwind.getColor("text-white-500")} />}
75+
/>
76+
}
77+
onPress={() => {
78+
Linking.openURL("https://dribbble.com/timelessco");
79+
}}
80+
style={tailwind.style("ml-3")}
81+
size="lg"
6282
>
63-
<Button
64-
prefix={
65-
<Icon
66-
icon={<Github fill={tailwind.getColor("text-white-500")} />}
67-
/>
68-
}
69-
onPress={() => {
70-
Linking.openURL("https://github.com/timelessco");
71-
}}
72-
size="xl"
73-
>
74-
Github
75-
</Button>
76-
<Button
77-
prefix={
78-
<Icon
79-
icon={<Dribble fill={tailwind.getColor("text-white-500")} />}
80-
/>
81-
}
82-
onPress={() => {
83-
Linking.openURL("https://dribbble.com/timelessco");
84-
}}
85-
size="xl"
86-
style={tailwind.style("ml-2")}
87-
>
88-
Dribble
89-
</Button>
90-
</Box>
83+
Dribble
84+
</Button>
9185
</Box>
9286
<Text style={tailwind.style("font-medium pt-2")}>
9387
version: {Constants.manifest.version}(5)

0 commit comments

Comments
 (0)