xref: /MusicFree/src/components/base/empty.tsx (revision 4060c00a75883036bbd315fb25c90065209312b3)
121f1ca13S猫头猫import React from 'react';
221f1ca13S猫头猫import {StyleSheet, View} from 'react-native';
321f1ca13S猫头猫import rpx from '@/utils/rpx';
421f1ca13S猫头猫import ThemeText from './themeText';
521f1ca13S猫头猫
6*ecd094f3S猫头猫interface IEmptyProps {
7*ecd094f3S猫头猫    content?: string;
8*ecd094f3S猫头猫}
9*ecd094f3S猫头猫export default function Empty(props: IEmptyProps) {
1021f1ca13S猫头猫    return (
1121f1ca13S猫头猫        <View style={style.wrapper}>
12*ecd094f3S猫头猫            <ThemeText fontSize="title">
13*ecd094f3S猫头猫                {props?.content ?? '什么都没有呀~'}
14*ecd094f3S猫头猫            </ThemeText>
1521f1ca13S猫头猫        </View>
1621f1ca13S猫头猫    );
1721f1ca13S猫头猫}
1821f1ca13S猫头猫
1921f1ca13S猫头猫const style = StyleSheet.create({
2021f1ca13S猫头猫    wrapper: {
2121f1ca13S猫头猫        width: '100%',
2221f1ca13S猫头猫        flex: 1,
2321f1ca13S猫头猫        minHeight: rpx(300),
2421f1ca13S猫头猫        justifyContent: 'center',
2521f1ca13S猫头猫        alignItems: 'center',
2621f1ca13S猫头猫    },
2721f1ca13S猫头猫});
28