Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

update dialog ui

ammarahm-ed1a861c5cdff4
diff --git a/apps/mobile/src/components/Dialog/DialogButtons.js b/apps/mobile/src/components/Dialog/DialogButtons.js
index 5872d3988..13fd600db 100644
--- a/apps/mobile/src/components/Dialog/DialogButtons.js
+++ b/apps/mobile/src/components/Dialog/DialogButtons.js
@@ -1,5 +1,6 @@
import React from 'react';
import {StyleSheet, View} from 'react-native';
+import {SIZE} from '../../utils/SizeUtils';
import {Button} from '../Button';
const DialogButtons = ({
@@ -9,11 +10,20 @@ const DialogButtons = ({
negativeTitle = 'Cancel',
}) => {
return (
- <View
- style={styles.container}>
-
- <Button onPress={onPressNegative} grayed title={negativeTitle} />
- <Button onPress={onPressPositive} title={positiveTitle} />
+ <View style={styles.container}>
+ <Button
+ onPress={onPressNegative}
+ fontSize={SIZE.md}
+ grayed
+ width="30%"
+ title={negativeTitle}
+ />
+ <Button
+ onPress={onPressPositive}
+ fontSize={SIZE.md}
+ width="30%"
+ title={positiveTitle}
+ />
</View>
);
};
@@ -21,10 +31,11 @@ const DialogButtons = ({
export default DialogButtons;
const styles = StyleSheet.create({
- container:{
- justifyContent: 'space-around',
+ container: {
+ justifyContent: 'flex-end',
alignItems: 'center',
flexDirection: 'row',
marginTop: 20,
- }
-})
+
+ },
+});
diff --git a/apps/mobile/src/components/Dialog/DialogHeader.js b/apps/mobile/src/components/Dialog/DialogHeader.js
index 7fd8389ba..9cb2c40bf 100644
--- a/apps/mobile/src/components/Dialog/DialogHeader.js
+++ b/apps/mobile/src/components/Dialog/DialogHeader.js
@@ -2,7 +2,7 @@ import React from 'react';
import {Text, View} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import {useTracked} from '../../provider';
-import {SIZE, WEIGHT} from "../../utils/SizeUtils";
+import {SIZE, WEIGHT} from '../../utils/SizeUtils';
const DialogHeader = ({icon, title, paragraph}) => {
const [state, dispatch] = useTracked();
@@ -13,29 +13,27 @@ const DialogHeader = ({icon, title, paragraph}) => {
<View
style={{
flexDirection: 'row',
- justifyContent: 'center',
alignItems: 'center',
}}>
- {icon ? (
+ {/* {icon ? (
<Icon name={icon} color={colors.accent} size={SIZE.lg} />
- ) : null}
+ ) : null} */}
<Text
style={{
color: colors.heading,
fontFamily: WEIGHT.bold,
- marginLeft: 5,
- fontSize: SIZE.lg,
+ fontSize: SIZE.xl,
}}>
{title}
</Text>
</View>
+
{paragraph ? (
<Text
style={{
color: colors.icon,
fontFamily: WEIGHT.regular,
- fontSize: SIZE.xs + 1,
- textAlign: 'center',
+ fontSize: SIZE.sm,
}}>
{paragraph}
</Text>