Skip to content

Commit 05937f4

Browse files
committed
chore: updated colors, types styles and props
1 parent 9181944 commit 05937f4

File tree

7 files changed

+21
-25
lines changed

7 files changed

+21
-25
lines changed

template/src/components/molecules/Typography/Typography.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ const variantStyle = (theme: DefaultTheme) => {
3737
prop: 'variant',
3838
variants: {
3939
regular: {
40-
fontFamily: 'heading',
40+
fontFamily: 'body',
4141
},
4242
bold: {
43-
fontFamily: 'body',
43+
fontFamily: 'heading',
4444
},
4545
},
4646
});

template/src/components/organisms/CardPeoples.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ const CardPeoples = ({ name, homeworld, onPress }: CardPeopleProps) => {
2020
variant="rounded"
2121
height={80}
2222
onPress={onPress}
23-
bg={theme.colors.primary}>
24-
<Typography color={theme.colors.white}>{name}</Typography>
25-
<Typography color={theme.colors.white}>{homeworld}</Typography>
23+
bg={'primary'}>
24+
<Typography color={'secondary'}>{name}</Typography>
25+
<Typography color={'secondary'}>{homeworld}</Typography>
2626
</Button>
2727
</Box>
2828
);

template/src/screens/CharacterDetail.tsx

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
import React, { Suspense } from 'react';
1+
import React from 'react';
22
import { RouteProp, useNavigation, useRoute } from '@react-navigation/native';
3-
43
import { CommonStackParamList } from 'screens';
54
import { Box } from 'components/molecules/Box';
65
import { SafeAreaView } from 'react-native-safe-area-context';
7-
import { PADDING } from 'styles/spacing';
86
import { StatusBar, StyleSheet } from 'react-native';
97
import { theme } from 'theme';
108
import { Typography } from 'components/molecules/Typography';
119
import UserAvatar from 'react-native-user-avatar';
12-
import { FONT_SIZE_16 } from 'styles/typography';
1310
import { Button } from 'components/molecules/Button';
1411
import { StackNavigationProp } from '@react-navigation/stack';
1512
import { WINDOW_DEVICE_WIDTH } from '@utils/constants';
@@ -35,16 +32,16 @@ const CharacterDetailScreen = () => {
3532
{name}
3633
</Typography>
3734
<Box my={'md'}>
38-
<Typography variant="bold" color={'white'} fontSize={FONT_SIZE_16}>
35+
<Typography variant="bold" color={'white'} fontSize="ls">
3936
Gender - {restProperties.gender}
4037
</Typography>
41-
<Typography variant="bold" color={'white'} fontSize={FONT_SIZE_16}>
38+
<Typography variant="bold" color={'white'} fontSize="ls">
4239
Hair color - {restProperties.hair_color}
4340
</Typography>
44-
<Typography variant="bold" color={'white'} fontSize={FONT_SIZE_16}>
41+
<Typography variant="bold" color={'white'} fontSize="ls">
4542
Eye color - {restProperties.eye_color}
4643
</Typography>
47-
<Typography variant="bold" color={'white'} fontSize={FONT_SIZE_16}>
44+
<Typography variant="bold" color={'white'} fontSize="ls">
4845
Skin color - {restProperties.skin_color}
4946
</Typography>
5047
</Box>
@@ -74,7 +71,7 @@ export default CharacterDetailScreen;
7471
const styles = StyleSheet.create({
7572
safeArea: {
7673
flex: 1,
77-
backgroundColor: theme.colors.black,
74+
backgroundColor: theme.colors.backgroundColor,
7875
},
7976
});
8077

template/src/screens/Home.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Button } from 'components/molecules/Button';
44
import React, { useCallback, useEffect, useRef } from 'react';
55
import { StyleSheet, StatusBar } from 'react-native';
66
import { SafeAreaView } from 'react-native-safe-area-context';
7-
import { FONT_SIZE_16 } from 'styles/typography';
87

98
import { theme } from 'theme';
109

@@ -127,7 +126,7 @@ const HomeScreen = () => {
127126
<SafeAreaView style={styles.safeArea}>
128127
<StatusBar barStyle="light-content" />
129128
<Box flex={1} alignItems="center" paddingTop={'sm'}>
130-
<Typography color={'secondary'} fontSize={FONT_SIZE_16} variant="bold">
129+
<Typography color={'primary'} fontSize={'xl'} variant="bold">
131130
STAR WARS API
132131
</Typography>
133132
<Box
@@ -147,10 +146,7 @@ const HomeScreen = () => {
147146
width: 60,
148147
}}
149148
/>
150-
<Typography
151-
variant="bold"
152-
fontSize={FONT_SIZE_16}
153-
color={'white'}>
149+
<Typography variant="bold" fontSize={'ls'} color={'white'}>
154150
We are finding information about
155151
</Typography>
156152
</Box>
@@ -226,6 +222,6 @@ export default HomeScreen;
226222
const styles = StyleSheet.create({
227223
safeArea: {
228224
flex: 1,
229-
backgroundColor: theme.colors.black,
225+
backgroundColor: theme.colors.backgroundColor,
230226
},
231227
});

template/src/styles/colors.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// DEFAULT
2-
export const PRIMARY = '#1D1C83';
3-
export const SECONDARY = '#030065';
2+
export const PRIMARY = '#E0F2E9';
3+
export const SECONDARY = '#114B5F';
4+
export const BACKGROUND_COLOR = '#3C887E';
45
export const WHITE = '#F9F7FE';
56
export const BLACK = '#1B1F23';
67

template/styled.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ declare module 'styled-components' {
2121
green: string;
2222
grayLight: string;
2323
success: string;
24+
backgroundColor: string;
2425
};
2526
typography: {
2627
FONT_REGULAR: string;

template/theme.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const theme: DefaultTheme = {
1919
green: colors.GREEN,
2020
grayLight: colors.GRAY_LIGHT,
2121
success: colors.SUCCESS,
22+
backgroundColor: colors.BACKGROUND_COLOR,
2223
},
2324
typography: {
2425
FONT_REGULAR: typography.FONT_FAMILY_REGULAR,
@@ -53,8 +54,8 @@ const theme: DefaultTheme = {
5354
xxl: 64,
5455
},
5556
fonts: {
56-
body: '',
57-
heading: '',
57+
body: 'RobotoMono-Regular',
58+
heading: 'RobotoMono-Bold',
5859
},
5960
};
6061

0 commit comments

Comments
 (0)