diff options
author | Ansh <anshnanda10@gmail.com> | 2023-06-26 17:10:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-26 17:10:04 -0700 |
commit | 25b3e14926d2d565b37c3ff715897ca7c513a0d2 (patch) | |
tree | ecd17ea18d645e8cc2ca1283c0c028dac7aabe38 /src/view/com/modals/Confirm.tsx | |
parent | cd21a7dfc903576c49ec71cb929f2e1c291fa5d2 (diff) | |
download | voidsky-25b3e14926d2d565b37c3ff715897ca7c513a0d2.tar.zst |
make discard btn more apparent in UI (#912)
Diffstat (limited to 'src/view/com/modals/Confirm.tsx')
-rw-r--r-- | src/view/com/modals/Confirm.tsx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/view/com/modals/Confirm.tsx b/src/view/com/modals/Confirm.tsx index 11e1a6334..f9bc0de14 100644 --- a/src/view/com/modals/Confirm.tsx +++ b/src/view/com/modals/Confirm.tsx @@ -12,6 +12,7 @@ import {ErrorMessage} from '../util/error/ErrorMessage' import {cleanError} from 'lib/strings/errors' import {usePalette} from 'lib/hooks/usePalette' import {isDesktopWeb} from 'platform/detection' +import type {ConfirmModal} from 'state/models/ui/shell' export const snapPoints = ['50%'] @@ -20,12 +21,9 @@ export function Component({ message, onPressConfirm, onPressCancel, -}: { - title: string - message: string | (() => JSX.Element) - onPressConfirm: () => void | Promise<void> - onPressCancel?: () => void | Promise<void> -}) { + confirmBtnText, + confirmBtnStyle, +}: ConfirmModal) { const pal = usePalette('default') const store = useStores() const [isProcessing, setIsProcessing] = useState<boolean>(false) @@ -68,11 +66,13 @@ export function Component({ <TouchableOpacity testID="confirmBtn" onPress={onPress} - style={[styles.btn]} + style={[styles.btn, confirmBtnStyle]} accessibilityRole="button" accessibilityLabel="Confirm" accessibilityHint=""> - <Text style={[s.white, s.bold, s.f18]}>Confirm</Text> + <Text style={[s.white, s.bold, s.f18]}> + {confirmBtnText ?? 'Confirm'} + </Text> </TouchableOpacity> )} {onPressCancel === undefined ? null : ( |