Skip to content

Commit

Permalink
Feature/ Criando componente de grupo medico #9
Browse files Browse the repository at this point in the history
  • Loading branch information
AGoretti committed Nov 19, 2020
1 parent bacb359 commit c85444c
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 7 deletions.
28 changes: 28 additions & 0 deletions mobile/DiarioSaude/src/components/groupItem/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from "react";
import { View, Image, Text } from "react-native";
import styles from "./styles";
import { RectButton } from "react-native-gesture-handler";

function GroupItem() {
return (
<View style={styles.container}>
<View style={styles.profile}>
<View style={styles.profileInfo}>
<Text style={styles.name}>Nome</Text>
</View>
</View>

<Text style={styles.bio}>Bio</Text>

<View style={styles.footer}>
<View style={styles.buttonsContainer}>
<RectButton style={styles.contactButton}>
<Text style={styles.contactButtonText}>Entrar em contato</Text>
</RectButton>
</View>
</View>
</View>
);
}

export default GroupItem;
105 changes: 105 additions & 0 deletions mobile/DiarioSaude/src/components/groupItem/styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import { StyleSheet } from "react-native";

const styles = StyleSheet.create({
container: {
backgroundColor: "#fff",
borderWidth: 1,
borderColor: "#e6e6f0",
borderRadius: 8,
marginBottom: 16,
overflow: "hidden",
alignItems: "center"
},

profile: {
flexDirection: "row",
alignItems: "center",
padding: 24
},

avatar: {
width: 64,
height: 64,
borderRadius: 32,
backgroundColor: "#eee"
},

profileInfo: {
marginLeft: 0
},

name: {
color: "#32264d",
fontSize: 20
},

subject: {
color: "#6a6180",
fontSize: 12,
marginTop: 4
},

bio: {
marginHorizontal: 24,

fontSize: 14,
lineHeight: 24,
color: "#6a6180"
},

footer: {
backgroundColor: "#fafafc",
padding: 24,
alignItems: "center",
marginTop: 24
},

price: {
color: "#6a6180",
fontSize: 14
},

priceValue: {
color: "#8257e5",
fontSize: 16
},

buttonsContainer: {
flexDirection: "row",
marginTop: 16
},

favoriteButton: {
backgroundColor: "#8257e5",
width: 56,
height: 56,
borderRadius: 8,
justifyContent: "center",
alignItems: "center",
marginRight: 8
},

favorited: {
backgroundColor: "#e33d3d"
},

contactButton: {
backgroundColor: "#0124A2",
flex: 1,
height: 56,
borderRadius: 8,
flexDirection: "row",
justifyContent: "center",
alignItems: "center",
marginRight: 8
},

contactButtonText: {
color: "#fff",

fontSize: 16,
marginLeft: 16
}
});

export default styles;
14 changes: 7 additions & 7 deletions mobile/DiarioSaude/src/pages/Medico/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import React, { useContext } from "react";
import { Text, View, Button } from "react-native";
import { Text, View, Image, ScrollView } from "react-native";
import styles from "../SignupMedic/styles";
import { RectButton } from "react-native-gesture-handler";
import AuthContext from "../../contexts/auth";
import AsyncStorage from "@react-native-community/async-storage";
import GroupItem from "../../components/groupItem";

function Medico() {
const storagedUser = AsyncStorage.getItem("@DiarioSaude:user");

return (
<View style={styles.container}>
<Text>Medico</Text>
<RectButton>
<Text>Sair</Text>
</RectButton>
</View>
<ScrollView>
<GroupItem />
<GroupItem />
<GroupItem />
</ScrollView>
);
}

Expand Down

0 comments on commit c85444c

Please sign in to comment.