mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-24 22:03:21 +03:00
created buttons component & created login header bar
This commit is contained in:
parent
0addf95020
commit
ed38404414
3
src/components/buttons/index.js
Normal file
3
src/components/buttons/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import GreetingHeaderButton from "./views/greetingHeaderButtonView";
|
||||||
|
|
||||||
|
export { GreetingHeaderButton };
|
13
src/components/buttons/views/greetingHeaderButtonStyles.js
Normal file
13
src/components/buttons/views/greetingHeaderButtonStyles.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import EStyleSheet from "react-native-extended-stylesheet";
|
||||||
|
|
||||||
|
export default EStyleSheet.create({
|
||||||
|
button: {
|
||||||
|
width: 54,
|
||||||
|
backgroundColor: "transparent",
|
||||||
|
height: 19,
|
||||||
|
},
|
||||||
|
buttonText: {
|
||||||
|
color: "#c1c5c7",
|
||||||
|
fontSize: 16,
|
||||||
|
},
|
||||||
|
});
|
17
src/components/buttons/views/greetingHeaderButtonView.js
Normal file
17
src/components/buttons/views/greetingHeaderButtonView.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import React, { Fragment } from "react";
|
||||||
|
import { TouchableWithoutFeedback, Text } from "react-native";
|
||||||
|
|
||||||
|
import styles from "./greetingHeaderButtonStyles";
|
||||||
|
|
||||||
|
const GreetingHeaderButtonView = ({ text, onPress, style }) => (
|
||||||
|
<Fragment>
|
||||||
|
<TouchableWithoutFeedback
|
||||||
|
style={[styles.button, style]}
|
||||||
|
onPress={() => onPress && onPress()}
|
||||||
|
>
|
||||||
|
<Text style={styles.buttonText}>{text}</Text>
|
||||||
|
</TouchableWithoutFeedback>
|
||||||
|
</Fragment>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default GreetingHeaderButtonView;
|
@ -1,12 +1,16 @@
|
|||||||
import EStyleSheet from "react-native-extended-stylesheet";
|
import EStyleSheet from "react-native-extended-stylesheet";
|
||||||
|
|
||||||
export default EStyleSheet.create({
|
export default EStyleSheet.create({
|
||||||
wrapper: {
|
container: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
flexDirection: "column",
|
||||||
|
height: "$deviceHeight / 3",
|
||||||
|
},
|
||||||
|
body: {
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
maxHeight: "$deviceHeight / 3",
|
maxHeight: "$deviceHeight / 3",
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
backgroundColor: "#ffffff",
|
backgroundColor: "$white",
|
||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
textAlignVertical: "center",
|
textAlignVertical: "center",
|
||||||
@ -31,7 +35,24 @@ export default EStyleSheet.create({
|
|||||||
flex: 0.4,
|
flex: 0.4,
|
||||||
alignSelf: "center",
|
alignSelf: "center",
|
||||||
height: 100,
|
height: 100,
|
||||||
marginTop: 20,
|
marginTop: 50,
|
||||||
left: 20,
|
marginLeft: 32,
|
||||||
|
},
|
||||||
|
headerRow: {
|
||||||
|
width: "$deviceWidth",
|
||||||
|
flexDirection: "row",
|
||||||
|
height: 55,
|
||||||
|
justifyContent: "space-between",
|
||||||
|
},
|
||||||
|
logo: {
|
||||||
|
width: 32,
|
||||||
|
height: 32,
|
||||||
|
marginLeft: 32,
|
||||||
|
alignSelf: "center",
|
||||||
|
},
|
||||||
|
headerButton: {
|
||||||
|
margin: 10,
|
||||||
|
marginRight: 19,
|
||||||
|
alignSelf: "center",
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -3,7 +3,7 @@ import { View, Text, Image } from "react-native";
|
|||||||
// Constants
|
// Constants
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
|
import { GreetingHeaderButton } from "../../buttons";
|
||||||
// Styles
|
// Styles
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
import styles from "./loginHeaderStyles";
|
import styles from "./loginHeaderStyles";
|
||||||
@ -28,16 +28,27 @@ class LoginHeaderView extends Component {
|
|||||||
const { description, title } = this.props;
|
const { description, title } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.wrapper}>
|
<View styles={styles.container}>
|
||||||
<View style={styles.titleText}>
|
<View style={styles.headerRow}>
|
||||||
<Text style={styles.title}>{title}</Text>
|
|
||||||
<Text style={styles.description}>{description}</Text>
|
|
||||||
</View>
|
|
||||||
<View style={{ flex: 0.7 }}>
|
|
||||||
<Image
|
<Image
|
||||||
style={styles.mascot}
|
style={styles.logo}
|
||||||
source={require("../../../assets/love_mascot.png")}
|
source={require("../../../assets/esteem.png")}
|
||||||
/>
|
/>
|
||||||
|
<View style={styles.headerButton}>
|
||||||
|
<GreetingHeaderButton text="Sign up" />
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<View style={styles.body}>
|
||||||
|
<View style={styles.titleText}>
|
||||||
|
<Text style={styles.title}>{title}</Text>
|
||||||
|
<Text style={styles.description}>{description}</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{ flex: 0.7 }}>
|
||||||
|
<Image
|
||||||
|
style={styles.mascot}
|
||||||
|
source={require("../../../assets/love_mascot.png")}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
@ -8,6 +8,7 @@ import {
|
|||||||
TextInput,
|
TextInput,
|
||||||
BackHandler,
|
BackHandler,
|
||||||
Linking,
|
Linking,
|
||||||
|
StatusBar,
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
|
|
||||||
import { Navigation } from "react-native-navigation";
|
import { Navigation } from "react-native-navigation";
|
||||||
@ -154,6 +155,7 @@ class LoginScreen extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<View style={{ flex: 1 }}>
|
<View style={{ flex: 1 }}>
|
||||||
|
<StatusBar hidden translucent />
|
||||||
<LoginHeader
|
<LoginHeader
|
||||||
title="Sign in"
|
title="Sign in"
|
||||||
description="To get all the benefits using eSteem"
|
description="To get all the benefits using eSteem"
|
||||||
|
Loading…
Reference in New Issue
Block a user