import { StatusBar } from "expo-status-bar";
import {
StyleSheet,
Text,
View,
Button,
TextInput,
SafeAreaView,
ScrollView,
} from "react-native";
import styled from "styled-components";
import { AntDesign } from "@expo/vector-icons";
import { FontAwesome } from "@expo/vector-icons";
export default function App() {
return (
<SafeAreaView style={styles.container}>
<StatusBar style="auto" />
<View
style={{
margin: 10,
flexDirection: "row",
justifyContent: "space-between",
}}
>
<TobButton style={{ backgroundColor: "lightblue" }}>
<Text>JavaScript</Text>
</TobButton>
<TobButton>
<Text>React</Text>
</TobButton>
<TobButton>
<Text>Coding Test</Text>
</TobButton>
</View>
<View style={Hr.View} />
<View
style={{
justifyContent: "center",
alignItems: "center",
}}
>
<InputText placeholder="Enter your task" />
</View>
<View style={Hr.View} />
<ScrollView>
<TodoBox>
<View style={{ flexDirection: "row" }}>
<Text>신나는 실행컨텍스트 공부</Text>
<View
style={{
flex: "1",
alignItems: "flex-end",
}}
>
<View
style={{
flexDirection: "row",
justifyContent: "space-around",
width: 90,
}}
>
<AntDesign name="checksquare" size={24} color="black" />
<FontAwesome name="pencil-square-o" size={24} color="black" />
<FontAwesome name="trash-o" size={24} color="black" />
</View>
</View>
</View>
</TodoBox>
<TodoBox>
<View style={{ flexDirection: "row" }}>
<Text>너무 좋은 ES6 최신문법 공부</Text>
<View
style={{
flex: "1",
alignItems: "flex-end",
}}
>
<View
style={{
flexDirection: "row",
justifyContent: "space-around",
width: 90,
}}
>
<AntDesign name="checksquare" size={24} color="black" />
<FontAwesome name="pencil-square-o" size={24} color="black" />
<FontAwesome name="trash-o" size={24} color="black" />
</View>
</View>
</View>
</TodoBox>
</ScrollView>
</SafeAreaView>
);
}
const TobButton = styled.View`
background-color: gray;
border: 1px solid black;
width: 100;
height: 50;
justify-content: center;
align-items: center;
`;
const InputText = styled.TextInput`
width: 350;
height: 40;
border: 2px solid black;
margin: 10px;
`;
const TodoBox = styled.View`
border: 1px solid black;
background-color: lightgray;
justify-content: space-evenly;
margin: 10px;
padding: 10px;
`;
const Hr = StyleSheet.create({
View: {
borderBottomWidth: StyleSheet.hairlineWidth,
borderBottomColor: "black",
},
});
const styles = StyleSheet.create({
container: {
backgroundColor: "#fff"
},
});
완성한 모습~~~
'🌼 리액트 공부' 카테고리의 다른 글
[AsyncStorage] 리액트 네이티브로 앱을 만들때 , localStorage같은 역할을 할 수 있는 애가 있을까?! (0) | 2022.12.31 |
---|---|
[리액트 네이티브] 리액트 네이티브로 TodoList CRUD 기능 구현해보기 (0) | 2022.12.30 |
리액트 네이티브 첫 수업 (실시간 강의) 정리 #1 (0) | 2022.12.29 |
[리액트] Carousel (이미지 자동 슬라이드) 기능 구현하기 (0) | 2022.12.26 |
리액트 심화 강의 복습 / redux-toolkit , json-server, thunk , Axios (1) | 2022.12.23 |
댓글