about summary refs log tree commit diff
path: root/src/view/com/composer/Composer.tsx
diff options
context:
space:
mode:
authorAnsh <anshnanda10@gmail.com>2023-06-26 17:10:04 -0700
committerGitHub <noreply@github.com>2023-06-26 17:10:04 -0700
commit25b3e14926d2d565b37c3ff715897ca7c513a0d2 (patch)
treeecd17ea18d645e8cc2ca1283c0c028dac7aabe38 /src/view/com/composer/Composer.tsx
parentcd21a7dfc903576c49ec71cb929f2e1c291fa5d2 (diff)
downloadvoidsky-25b3e14926d2d565b37c3ff715897ca7c513a0d2.tar.zst
make discard btn more apparent in UI (#912)
Diffstat (limited to 'src/view/com/composer/Composer.tsx')
-rw-r--r--src/view/com/composer/Composer.tsx17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx
index abac291a2..fb6aaa231 100644
--- a/src/view/com/composer/Composer.tsx
+++ b/src/view/com/composer/Composer.tsx
@@ -107,12 +107,14 @@ export const ComposePost = observer(function ComposePost({
 
         shell.openModal({
           name: 'confirm',
-          title: 'Cancel draft',
+          title: 'Discard draft',
           onPressConfirm: onClose,
           onPressCancel: () => {
             store.shell.closeModal()
           },
-          message: "Are you sure you'd like to cancel this draft?",
+          message: "Are you sure you'd like to discard this draft?",
+          confirmBtnText: 'Discard',
+          confirmBtnStyle: {backgroundColor: colors.red4},
         })
       }
     },
@@ -222,13 +224,13 @@ export const ComposePost = observer(function ComposePost({
       <View style={[s.flex1, viewStyles]} aria-modal accessibilityViewIsModal>
         <View style={styles.topbar}>
           <TouchableOpacity
-            testID="composerCancelButton"
+            testID="composerDiscardButton"
             onPress={hackfixOnClose}
             onAccessibilityEscape={hackfixOnClose}
             accessibilityRole="button"
-            accessibilityLabel="Cancel"
-            accessibilityHint="Closes post composer">
-            <Text style={[pal.link, s.f18]}>Cancel</Text>
+            accessibilityLabel="Discard"
+            accessibilityHint="Closes post composer and discards post draft">
+            <Text style={[pal.link, s.f18, styles.discard]}>Discard</Text>
           </TouchableOpacity>
           <View style={s.flex1} />
           {isProcessing ? (
@@ -381,6 +383,9 @@ const styles = StyleSheet.create({
     paddingHorizontal: 20,
     height: 55,
   },
+  discard: {
+    color: colors.red3,
+  },
   postBtn: {
     borderRadius: 20,
     paddingHorizontal: 20,