mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
replace button with Pressable
This commit is contained in:
@@ -24,6 +24,7 @@ import {PinnedItemList} from './PinnedItemList';
|
|||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
import NavigationService from '../../services/NavigationService';
|
import NavigationService from '../../services/NavigationService';
|
||||||
import {Placeholder} from '../ListPlaceholders';
|
import {Placeholder} from '../ListPlaceholders';
|
||||||
|
import { PressableButton } from '../PressableButton';
|
||||||
const sectionListRef = createRef();
|
const sectionListRef = createRef();
|
||||||
|
|
||||||
const AnimatedFlatlist = Animatable.createAnimatableComponent(FlatList);
|
const AnimatedFlatlist = Animatable.createAnimatableComponent(FlatList);
|
||||||
@@ -174,7 +175,7 @@ const SimpleList = ({
|
|||||||
: 155 - 60 - insets.top,
|
: 155 - 60 - insets.top,
|
||||||
}}>
|
}}>
|
||||||
{user || !data[0] || selectionMode ? null : (
|
{user || !data[0] || selectionMode ? null : (
|
||||||
<TouchableOpacity
|
<PressableButton
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
DDS.isTab
|
DDS.isTab
|
||||||
? eSendEvent(eOpenLoginDialog)
|
? eSendEvent(eOpenLoginDialog)
|
||||||
@@ -182,14 +183,16 @@ const SimpleList = ({
|
|||||||
root: true,
|
root: true,
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
activeOpacity={opacity}
|
color={colors.shade}
|
||||||
style={{
|
selectedColor={colors.accent}
|
||||||
|
alpha={!colors.night ? -0.02 : 0.1}
|
||||||
|
opacity={0.12}
|
||||||
|
customStyle={{
|
||||||
paddingVertical: 6,
|
paddingVertical: 6,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'flex-start',
|
justifyContent: 'flex-start',
|
||||||
backgroundColor: colors.shade,
|
|
||||||
paddingHorizontal: 12,
|
paddingHorizontal: 12,
|
||||||
alignSelf: 'center',
|
alignSelf: 'center',
|
||||||
}}>
|
}}>
|
||||||
@@ -232,7 +235,7 @@ const SimpleList = ({
|
|||||||
Login to sync your {type}.
|
Login to sync your {type}.
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</TouchableOpacity>
|
</PressableButton>
|
||||||
)}
|
)}
|
||||||
{pinned ? <PinnedItemList type={type} /> : null}
|
{pinned ? <PinnedItemList type={type} /> : null}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user