1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
Files
tooot/src/components/Timelines/Timeline/Shared/End.tsx
Zhiyuan Zheng 48cab6053c Use new alias
2020-12-13 14:04:25 +01:00

47 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Feather } from '@expo/vector-icons'
import React from 'react'
import { ActivityIndicator, StyleSheet, Text, View } from 'react-native'
import { StyleConstants } from '@utils/styles/constants'
import { useTheme } from '@utils/styles/ThemeManager'
export interface Props {
isFetchingMore: false | 'previous' | 'next' | undefined
}
const TimelineEnd: React.FC<Props> = ({ isFetchingMore }) => {
const { theme } = useTheme()
return (
<View style={styles.base}>
{isFetchingMore ? (
<ActivityIndicator />
) : (
<Text style={[styles.text, { color: theme.secondary }]}>
{' '}
<Feather
name='coffee'
size={StyleConstants.Font.Size.S}
color={theme.secondary}
/>{' '}
</Text>
)}
</View>
)
}
const styles = StyleSheet.create({
base: {
flex: 1,
flexDirection: 'row',
justifyContent: 'center',
padding: StyleConstants.Spacing.M
},
text: {
fontSize: StyleConstants.Font.Size.S,
marginLeft: StyleConstants.Spacing.S
}
})
export default TimelineEnd