Skip to content

Commit

Permalink
Add chevron to the example app and center labels (#3108)
Browse files Browse the repository at this point in the history
## Description

I noticed the button labels were off-center, so I fixed them and added a
chevron at the same time as it was looking kind of empty.

<img width="546" alt="Screenshot 2024-09-17 at 11 27 33"
src="https://github.com/user-attachments/assets/d3b65867-5630-4959-b715-82244f423ba5">
  • Loading branch information
j-piasecki authored Sep 17, 2024
1 parent 6bacf33 commit 56008d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
StackScreenProps,
} from '@react-navigation/stack';
import { NavigationContainer, ParamListBase } from '@react-navigation/native';
import Entypo from '@expo/vector-icons/Entypo';

This comment has been minimized.

Copy link
@tomekzaw

tomekzaw Sep 17, 2024

Member

why not swm icons? 😢

This comment has been minimized.

Copy link
@j-piasecki

j-piasecki Sep 17, 2024

Author Member

Expo was already there, will be fixed

import {
GestureHandlerRootView,
RectButton,
Expand Down Expand Up @@ -323,6 +324,7 @@ function MainScreenItem({ name, onPressItem }: MainScreenItemProps) {
return (
<RectButton style={[styles.button]} onPress={() => onPressItem(name)}>
<Text>{name}</Text>
<Entypo name="chevron-right" size={24} color="#bbb" />
</RectButton>
);
}
Expand Down Expand Up @@ -354,7 +356,10 @@ const styles = StyleSheet.create({
flex: 1,
height: 50,
padding: 10,
flexDirection: 'row',
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'space-between',
},
buttonContent: {
flex: 1,
Expand Down

0 comments on commit 56008d2

Please sign in to comment.