Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Tweak confirm dialog style (#1473)

Leendert de Borst6b3bb2b56eae
diff --git a/apps/mobile-app/components/common/ConfirmDialog.tsx b/apps/mobile-app/components/common/ConfirmDialog.tsx
index 588c67fb1..7e01a1a69 100644
--- a/apps/mobile-app/components/common/ConfirmDialog.tsx
+++ b/apps/mobile-app/components/common/ConfirmDialog.tsx
@@ -7,6 +7,8 @@ import {
TouchableOpacity,
View,
ActivityIndicator,
+ ViewStyle,
+ TextStyle,
} from 'react-native';
import { useColors } from '@/hooks/useColorScheme';
@@ -129,19 +131,19 @@ export const ConfirmDialog: React.FC<IConfirmDialogProps> = ({
/**
* Get button style based on button configuration.
*/
- const getButtonStyle = (button: IConfirmDialogButton, index: number): object[] => {
- const baseStyle = [styles.button];
+ const getButtonStyle = (button: IConfirmDialogButton, index: number): ViewStyle[] => {
+ const baseStyle: ViewStyle[] = [styles.button];
if (button.style === 'destructive') {
- baseStyle.push({ backgroundColor: colors.destructive });
+ baseStyle.push({ backgroundColor: colors.destructive } as ViewStyle);
} else if (button.style === 'cancel') {
baseStyle.push({
backgroundColor: colors.accentBackground,
borderColor: colors.accentBorder,
borderWidth: 1,
- });
+ } as ViewStyle);
} else {
- baseStyle.push({ backgroundColor: colors.primary });
+ baseStyle.push({ backgroundColor: colors.primary } as ViewStyle);
}
if (isSubmitting && loadingButtonIndex === index) {
@@ -154,13 +156,13 @@ export const ConfirmDialog: React.FC<IConfirmDialogProps> = ({
/**
* Get button text style based on button configuration.
*/
- const getButtonTextStyle = (button: IConfirmDialogButton): object[] => {
- const baseStyle = [styles.buttonText];
+ const getButtonTextStyle = (button: IConfirmDialogButton): TextStyle[] => {
+ const baseStyle: TextStyle[] = [styles.buttonText];
if (button.style === 'cancel') {
- baseStyle.push({ color: colors.text });
+ baseStyle.push({ color: colors.text } as TextStyle);
} else {
- baseStyle.push({ color: colors.white });
+ baseStyle.push({ color: colors.white } as TextStyle);
}
return baseStyle;
diff --git a/apps/mobile-app/components/common/ModalWrapper.tsx b/apps/mobile-app/components/common/ModalWrapper.tsx
index bf573ffb1..c7a256bdf 100644
--- a/apps/mobile-app/components/common/ModalWrapper.tsx
+++ b/apps/mobile-app/components/common/ModalWrapper.tsx
@@ -107,6 +107,7 @@ export const ModalWrapper: React.FC<IModalWrapperProps> = ({
borderBottomColor: showHeaderBorder ? colors.accentBorder : 'transparent',
borderBottomWidth: showHeaderBorder ? 1 : 0,
padding: 20,
+ paddingBottom: 0,
},
title: {
color: colors.text,