diff --git a/src/Map/MapPicker/MapPicker.tsx b/src/Map/MapPicker/MapPicker.tsx index 9201fb0..cbbf1fc 100644 --- a/src/Map/MapPicker/MapPicker.tsx +++ b/src/Map/MapPicker/MapPicker.tsx @@ -143,22 +143,21 @@ export const MapPicker = ({ map, onChange, testId }: Props) => { { _pickImage(); }} > - Choose image... + Choose image... - {_renderMenu()} + {_renderMenu('editmode')} { + const _renderMenu = (type: 'bottomsheet' | 'editmode') => { + let btnStyle: ViewStyle = {}; + let txtStyle: TextStyle = {}; + let viewstyle: ViewStyle = {}; + + switch (type) { + case 'bottomsheet': + btnStyle = { paddingVertical: 5 }; + txtStyle = {}; + viewstyle = {}; + break; + case 'editmode': + default: + btnStyle = { + paddingVertical: 10, + paddingHorizontal: 15, + alignSelf: 'center', + alignItems: 'center', + justifyContent: 'center', + backgroundColor: '#448AFF', + borderRadius: 5, + width: IS_WEB ? 'auto' : '100%', + margin: 5 + }; + txtStyle = { fontSize: 16, color: 'white' }; + viewstyle = { flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'center', alignItems: 'center' }; + } + return ( - Change map + + Change map + - + {type === 'bottomsheet' && ( + + )} { if (editMode) { @@ -813,9 +844,11 @@ export const LinkedMap = ({ setIsModalVisible(true); }, 100); }} - style={{ paddingVertical: 5 }} + style={btnStyle} > - Manage Positions + + Manage Positions + {!editMode && ( @@ -833,9 +866,11 @@ export const LinkedMap = ({ onPress={() => { bottomSheetRef.current?.close(); }} - style={{ paddingVertical: 5 }} + style={btnStyle} > - Close + + Close + )} @@ -1016,17 +1051,19 @@ export const LinkedMap = ({ flex: 1, paddingVertical: 5, paddingHorizontal: 8, - backgroundColor: "#448AFF", + backgroundColor: '#448AFF', borderRadius: 5, - borderColor: "black", + borderColor: 'black', borderWidth: 1, - justifyContent: "center", - alignItems: "center", + justifyContent: 'center', + alignItems: 'center', margin: 5 }} onPress={() => bottomSheetRef.current?.open()} > - Menu + + Menu + )} @@ -1072,7 +1109,7 @@ export const LinkedMap = ({ }} closeOnPressMask > - {_renderMenu()} + {_renderMenu('bottomsheet')} );