UNPKG

@resourge/react-fetch

Version:

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

33 lines (32 loc) 909 B
/** * react-fetch v1.43.1 * * Copyright (c) resourge. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ import React from 'react'; export type LoaderProps = { children?: React.ReactNode; /** * Unique id to distinct Loader from other loaders. * Serves as a way to manually trigger distinct loaders. * * Note: In case it's undefined, it will be treated as a global loader * @default '' */ loaderId?: string; /** * Loading element. * * Note: When set in a GlobalLoader, it will change the default loading element * * for every Loader */ loadingElement?: React.ReactNode; }; /** * Component with loaderId to trigger loading at the useFetch or LoadingService command. */ declare const Loader: React.FC<LoaderProps>; export default Loader;