๐ ํํ ๋ฆฌ์ผ์ ๋ฐ๋ผํ ํ๋ก์ ํธ์ ๋๋ค!
import { ... ScrollView,} from 'react-native';
์๋์ ์ฝ๋๋ฅผ TextInput ๋ค์์ ์ถ๊ฐํฉ๋๋ค.
<ScrollView>
<Text>TodoList</Text>
</ScrollView>
const App = () => {
return (
<SafeAreaView style={styles.container}>
<Text style={styles.appTitle}>Hello Todo List</Text>
<View style={styles.card}>
<TextInput style={styles.input} placeholder="Add an item!" />
<ScrollView>
<Text>TodoList</Text>
</ScrollView>
</View>
</SafeAreaView>
);
};
import React from 'react';
import {SafeAreaView, StyleSheet, TextInput, View, Text, ScrollView} from 'react-native';
const App = () => {
return (
<SafeAreaView style={styles.container}>
<Text style={styles.appTitle}>Hello Todo List</Text>
<View style={styles.card}>
<TextInput style={styles.input} placeholder="Add an item!" />
<ScrollView>
<Text>TodoList</Text>
</ScrollView>
</View>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#3143e8',
},
appTitle: {
color: '#fff',
fontSize: 36,
marginTop: 30,
marginBottom: 30,
fontWeight: '300',
textAlign: 'center',
backgroundColor: '#3143e8',
},
card: {
backgroundColor: '#fff',
flex: 1,
borderTopLeftRadius: 10,
borderTopRightRadius: 10,
marginLeft: 10,
marginRight: 10,
},
input: {
padding: 20,
borderBottomColor: '#bbb',
borderBottomWidth: 1,
fontSize: 24,
marginLeft: 20,
}
});
export default App;