inital commit
This commit is contained in:
49
src/components/TelegramAuthButton/TelegramAuthButton.tsx
Normal file
49
src/components/TelegramAuthButton/TelegramAuthButton.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import {FC, useCallback} from "react";
|
||||
import {
|
||||
GestureResponderEvent,
|
||||
Linking,
|
||||
StyleSheet,
|
||||
Text,
|
||||
TextInput,
|
||||
TouchableNativeFeedback,
|
||||
TouchableOpacity,
|
||||
View
|
||||
} from "react-native";
|
||||
import {RFPercentage} from "react-native-responsive-fontsize";
|
||||
|
||||
type Props = {
|
||||
onPress?: (event: GestureResponderEvent) => void
|
||||
}
|
||||
|
||||
const TelegramAuthButton: FC<Props> = ({onPress}) => {
|
||||
return (
|
||||
<TouchableNativeFeedback onPress={onPress}>
|
||||
<View style={styles.buttonContainer}>
|
||||
<View style={styles.buttonContent}>
|
||||
<Text style={styles.buttonText}>Войти</Text>
|
||||
</View>
|
||||
</View>
|
||||
</TouchableNativeFeedback>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
buttonContainer: {
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
},
|
||||
buttonContent: {
|
||||
backgroundColor: '#0090c9',
|
||||
borderRadius: RFPercentage(1),
|
||||
paddingHorizontal: 50,
|
||||
flexDirection: 'row', // Сохранено, так как возможно добавление иконки или другого элемента в будущем
|
||||
},
|
||||
buttonText: {
|
||||
flex: 1,
|
||||
fontSize: RFPercentage(3),
|
||||
color: 'white',
|
||||
textAlign: 'center',
|
||||
},
|
||||
});
|
||||
|
||||
export default TelegramAuthButton;
|
||||
Reference in New Issue
Block a user