refactor Pressable Button

This commit is contained in:
ammarahm-ed
2020-12-01 17:51:39 +05:00
parent 116307de7b
commit 470f5c90c0
22 changed files with 132 additions and 191 deletions

View File

@@ -1,16 +1,16 @@
import React from 'react';
import { ActivityIndicator, TouchableOpacity, View } from 'react-native';
import {ActivityIndicator, TouchableOpacity, View} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import { useTracked } from '../../provider';
import { Actions } from '../../provider/Actions';
import { eSendEvent, ToastEvent } from '../../services/EventManager';
import { SUBSCRIPTION_STATUS_STRINGS } from '../../utils';
import { db } from '../../utils/DB';
import { eOpenLoginDialog } from '../../utils/Events';
import { pv, SIZE } from '../../utils/SizeUtils';
import { PressableButton } from '../PressableButton';
import {useTracked} from '../../provider';
import {Actions} from '../../provider/Actions';
import {eSendEvent, ToastEvent} from '../../services/EventManager';
import {SUBSCRIPTION_STATUS_STRINGS} from '../../utils';
import {db} from '../../utils/DB';
import {eOpenLoginDialog} from '../../utils/Events';
import {pv, SIZE} from '../../utils/SizeUtils';
import {PressableButton} from '../PressableButton';
import Paragraph from '../Typography/Paragraph';
import { TimeSince } from './TimeSince';
import {TimeSince} from './TimeSince';
export const UserSection = ({noTextMode}) => {
const [state, dispatch] = useTracked();
@@ -116,10 +116,7 @@ export const UserSection = ({noTextMode}) => {
onPress={() => {
eSendEvent(eOpenLoginDialog);
}}
color={colors.accent}
selectedColor={colors.accent}
alpha={!colors.night ? -0.02 : 0.1}
opacity={0.12}
type="shade"
customStyle={{
paddingVertical: 12,
marginVertical: 5,