-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRoundButton.js
33 lines (31 loc) · 903 Bytes
/
RoundButton.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import React, { Component } from 'react';
import { StyleSheet, TouchableOpacity, Text, View } from 'react-native';
export default function RoundButton({ onPress }) {
return (
<View style={styles.buttonContainer}>
<TouchableOpacity style={styles.button} onPress={() => { console.log("Button Pressed"); onPress(); }}>
<Text style={styles.text}>+</Text>
</TouchableOpacity>
</View>
);
}
const styles = StyleSheet.create({
buttonContainer: {
position: 'absolute',
right: 20, // 오른쪽 여백 조정
bottom: 20, // 아래쪽 여백 조정
},
button: {
backgroundColor: 'black',
alignItems: 'center',
justifyContent: 'center',
width: 70,
height: 70,
borderRadius: 35,
},
text: {
fontSize: 50,
textAlign: 'center',
color: 'white',
}
});