Skip to content

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

add Button

ammarahm-eda02c6c502e2f
diff --git a/apps/mobile/src/components/Container/ContainerBottomButton.js b/apps/mobile/src/components/Container/ContainerBottomButton.js
index b55200d90..03acc5d5b 100644
--- a/apps/mobile/src/components/Container/ContainerBottomButton.js
+++ b/apps/mobile/src/components/Container/ContainerBottomButton.js
@@ -67,7 +67,7 @@ export const ContainerBottomButton = ({root}) => {
<PressableButton
color={colors.accent}
selectedColor={colors.accent}
- onPress={() => {}}>
+ onPress={containerBottomButton.bottomButtonOnPress}>
<View
style={{
...getElevation(5),
diff --git a/apps/mobile/src/components/Dialog/index.js b/apps/mobile/src/components/Dialog/index.js
index 3a0dc2cad..3d95aba53 100644
--- a/apps/mobile/src/components/Dialog/index.js
+++ b/apps/mobile/src/components/Dialog/index.js
@@ -14,6 +14,7 @@ import NavigationService from '../../services/NavigationService';
import {db, DDS, getElevation, history, ToastEvent} from '../../utils/utils';
import {dialogActions} from '../DialogManager/dialogActions';
import {updateEvent} from '../DialogManager/recievers';
+import { Button } from '../Button';
export class Dialog extends Component {
constructor(props) {
@@ -235,50 +236,18 @@ export class Dialog extends Component {
flexDirection: 'row',
marginTop: 20,
}}>
- <TouchableOpacity
- activeOpacity={opacity}
+ <Button
onPress={this._onClose}
- style={{
- paddingVertical: pv,
- paddingHorizontal: ph,
- borderRadius: 5,
- width: '48%',
- justifyContent: 'center',
- alignItems: 'center',
- backgroundColor: colors.nav,
- }}>
- <Text
- style={{
- fontFamily: WEIGHT.medium,
- color: colors.icon,
- fontSize: SIZE.sm,
- }}>
- {negativeText}
- </Text>
- </TouchableOpacity>
- <TouchableOpacity
- activeOpacity={opacity}
+ title={negativeText}
+ grayed
+ />
+ <Button
onPress={this._onPress}
- style={{
- paddingVertical: pv,
- paddingHorizontal: ph,
- borderRadius: 5,
- width: '48%',
- justifyContent: 'center',
- alignItems: 'center',
- borderColor: colors.accent,
- backgroundColor: colors.accent,
- borderWidth: 1,
- }}>
- <Text
- style={{
- fontFamily: WEIGHT.medium,
- color: 'white',
- fontSize: SIZE.sm,
- }}>
- {positiveText}
- </Text>
- </TouchableOpacity>
+ title={positiveText}
+
+ />
+
+
</View>
)}
</View>
diff --git a/apps/mobile/src/components/Menu/MenuListItem.js b/apps/mobile/src/components/Menu/MenuListItem.js
index 310c8f87c..92a1ecd25 100644
--- a/apps/mobile/src/components/Menu/MenuListItem.js
+++ b/apps/mobile/src/components/Menu/MenuListItem.js
@@ -37,7 +37,6 @@ export const MenuListItem = ({item, index, noTextMode, ignore}) => {
color={
currentScreen === item.name.toLowerCase() ? colors.shade : 'transparent'
}
-
selectedColor={colors.accent}
alpha={!colors.night ? -0.02 : 0.02}
opacity={0.12}
diff --git a/apps/mobile/src/components/PressableButton/index.js b/apps/mobile/src/components/PressableButton/index.js
index 4b4ceaf31..2142be1e3 100644
--- a/apps/mobile/src/components/PressableButton/index.js
+++ b/apps/mobile/src/components/PressableButton/index.js
@@ -22,7 +22,7 @@ export const PressableButton = ({
style={({pressed}) => [
{
backgroundColor:
- pressed && Platform.OS === 'ios' ? RGB_Linear_Shade(alpha, hexToRGBA(selectedColor, opacity)) : color,
+ pressed ? RGB_Linear_Shade(alpha, hexToRGBA(selectedColor, opacity)) : color,
width: '100%',
alignSelf: 'center',
borderRadius: br,