Skip to content

Commit a5650ce

Browse files
committed
add login screen buttons
1 parent caaef24 commit a5650ce

File tree

2 files changed

+109
-0
lines changed

2 files changed

+109
-0
lines changed

src/components/Button/Login/login.tsx

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import React from 'react';
2+
import {ViewStyle, View, Text, Platform, ColorPropType} from 'react-native';
3+
4+
import {TouchableShadow} from '../../Shadow/Touchable';
5+
import {K} from '../../../store/constants';
6+
7+
const themeFont = Platform.OS === 'ios' ? K.fonts.ios : K.fonts.android;
8+
export const GoogleLoginButton = (props: {
9+
theme: string;
10+
children: string;
11+
onPress?(): void;
12+
style?: ViewStyle;
13+
}) => {
14+
return (
15+
<View style={{flex: 1, alignSelf: 'flex-start'}} onTouchEnd={props.onPress}>
16+
<TouchableShadow
17+
theme={props.theme}
18+
style={{
19+
...props.style,
20+
backgroundColor: 'white',
21+
alignSelf: 'center',
22+
paddingVertical: 12,
23+
paddingHorizontal: 25,
24+
borderRadius: 10000,
25+
}}>
26+
<Text style={{...themeFont.body, color: 'black',}}>Login with Google</Text>
27+
</TouchableShadow>
28+
</View>
29+
);
30+
};
31+
32+
export const AppleLoginButton = (props: {
33+
theme: string;
34+
children: string;
35+
onPress?(): void;
36+
style?: ViewStyle;
37+
}) => {
38+
return (
39+
<View style={{flex: 1, alignSelf: 'flex-start'}} onTouchEnd={props.onPress}>
40+
<TouchableShadow
41+
theme={props.theme}
42+
style={{
43+
...props.style,
44+
backgroundColor: 'black',
45+
alignSelf: 'center',
46+
paddingVertical: 12,
47+
paddingHorizontal: 25,
48+
borderRadius: 10000,
49+
}}>
50+
<Text style={{...themeFont.body, color: 'white',}}>Login with apple</Text>
51+
</TouchableShadow>
52+
</View>
53+
);
54+
};
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import React from 'react';
2+
import {ViewStyle, View, Text, Platform} from 'react-native';
3+
4+
import {TouchableShadow} from '../../Shadow/Touchable';
5+
import {K} from '../../../store/constants';
6+
7+
const themeFont = Platform.OS === 'ios' ? K.fonts.ios : K.fonts.android;
8+
export const AppleLoginButton = (props: {
9+
theme: string;
10+
children: string;
11+
onPress?(): void;
12+
style?: ViewStyle;
13+
}) => {
14+
return (
15+
<View style={{flex: 1, alignSelf: 'flex-start'}} onTouchEnd={props.onPress}>
16+
<TouchableShadow
17+
theme={props.theme}
18+
style={{
19+
...props.style,
20+
backgroundColor: 'black',
21+
alignSelf: 'center',
22+
paddingVertical: 12,
23+
paddingHorizontal: 25,
24+
borderRadius: 10000,
25+
}}>
26+
<Text style={{...themeFont.body}}>Login With Apple</Text>
27+
</TouchableShadow>
28+
</View>
29+
);
30+
};
31+
32+
export const GoogleLoginButton = (props: {
33+
theme: string;
34+
children: string;
35+
onPress?(): void;
36+
style?: ViewStyle;
37+
}) => {
38+
return (
39+
<View style={{flex: 1, alignSelf: 'flex-start'}} onTouchEnd={props.onPress}>
40+
<TouchableShadow
41+
theme={props.theme}
42+
style={{
43+
...props.style,
44+
backgroundColor: 'white',
45+
alignSelf: 'center',
46+
paddingVertical: 12,
47+
paddingHorizontal: 25,
48+
borderRadius: 10000,
49+
}}>
50+
<Text style={{...themeFont.body}}>Login With Google</Text>
51+
</TouchableShadow>
52+
</View>
53+
);
54+
};
55+

0 commit comments

Comments
 (0)