π νν 리μΌμ λ°λΌν νλ‘μ νΈμ λλ€!
μλμ μ½λλ₯Ό μ± νμ΄ν λ°λ‘ μλμ μΆκ°ν©λλ€!
<View style={styles.card}>
<TextInput style={styles.input} placeholder="Add an item!" />
</View>
import React from 'react';
import {SafeAreaView, StyleSheet, TextInput, View, Text} from 'react-native';
const App = () => {
return (
<SafeAreaView style={styles.container}>
<Text style={styles.appTitle}>Hello Todolist</Text>
<View style={styles.card}>
<TextInput style={styles.input} placeholder="Add an item!" />
</View>
</SafeAreaView>
);
};
card: {
backgroundColor: '#fff',
flex: 1,
borderTopLeftRadius: 10, // to provide rounded corners
borderTopRightRadius: 10, // to provide rounded corners
marginLeft: 10,
marginRight: 10,
},
input: {
padding: 20,
borderBottomColor: '#bbb',
borderBottomWidth: 1,
fontSize: 24,
marginLeft: 20,
},
});
import React from 'react';
import {SafeAreaView, StyleSheet, TextInput, View, Text} from 'react-native';
const App = () => {
return (
<SafeAreaView style={styles.container}>
<Text style={styles.appTitle}>Hello Todolist</Text>
<View style={styles.card}>
<TextInput style={styles.input} placeholder="Add an item!" />
</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, // to provide rounded corners
borderTopRightRadius: 10, // to provide rounded corners
marginLeft: 10,
marginRight: 10,
},
input: {
padding: 20,
borderBottomColor: '#bbb',
borderBottomWidth: 1,
fontSize: 24,
marginLeft: 20,
},
});
export default App;
μ£Όμμ¬ν
View, Text κ°μ react-native μμ±μ import ν΄μΌνλ€. μνλ©΄ μλ¬λ¨
import {SafeAreaView, StyleSheet, Text} from 'react-native';