我想将按钮浮动到地图的右侧。不知何故,它不起作用。有人可以帮忙吗?
const styles = StyleSheet.create({
mapContainer: {
flex: 1,
},
map: {
flexDirection: 'row',
flex: 1,
borderRadius: 4,
borderWidth: 2,
borderColor: 'purple',
width,
height,
},
button: {
marginLeft: 'auto',
borderRadius: 4,
borderWidth: 2,
borderColor: 'red',
}
})