import React, { FC, memo } from 'react'; import { View, Text } from 'react-native'; import { useThemeFactory } from '../Theme'; import Circular from './Circular'; import Spinner from './Spinner'; import type { LoadingProps } from './type'; import { createStyle } from './style'; const Loading: FC = props => { const { styles, theme } = useThemeFactory(createStyle); const { children, size = 30, type = 'circular', vertical, textColor, textSize, style, color = theme.gray_5, ...rest } = props; return ( {type === 'circular' ? ( ) : ( )} {children && ( {children} )} ); }; export default memo(Loading);