import React, { useContext } from 'react'; import { ConfigContext } from '.'; import type { ConfigConsumerProps } from '.'; import Empty from '../empty'; interface EmptyProps { componentName?: string; } const DefaultRenderEmpty: React.FC = (props) => { const { componentName } = props; const { getPrefixCls } = useContext(ConfigContext); const prefix = getPrefixCls('empty'); switch (componentName) { case 'Table': case 'List': return ; case 'Select': case 'TreeSelect': case 'Cascader': case 'Transfer': case 'Mentions': return ; /* istanbul ignore next */ default: // Should never hit if we take all the component into consider. return ; } }; export type RenderEmptyHandler = (componentName?: string) => React.ReactNode; export default DefaultRenderEmpty;