import React from 'react';
import {Text, ViewStyle, StyleSheet} from 'react-native';
import {$Colors} from './style';

export type FinishedProps = {
    show?: boolean;
    title?: string;
    style?: ViewStyle;
};

const Finished: React.FC<FinishedProps> = ({show = true, title = '没有更多了~', style}) => {
    return show ? <Text style={[styles.text, style]}>{title}</Text> : null;
};
export default Finished;

const styles = StyleSheet.create({
    text: {
        textAlign: 'center',
        color: $Colors.lighterText,
        padding: 5,
        marginBottom: 10,
    },
});
