We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I suggest adding a prop for a custom loading, just like errorComponent. Or adding an "on load" function to know when the file has finished loading.
e.g. file-viewer.jsx Add these
FileViewer.propTypes = { errorComponent: PropTypes.element, filePath: PropTypes.string.isRequired, fileType: PropTypes.string.isRequired, loadingComponent: PropTypes.element, onError: PropTypes.func, unsupportedComponent: PropTypes.element, }; FileViewer.defaultProps = { errorComponent: null, loadingComponent: null, onError: () => null, unsupportedComponent: null, };
e.g. loading.jsx Could look like this
import React from 'react'; import 'styles/loading.scss'; const Loading = () => ( <div className="loading-container"> {props.loadingComponent ? <props.loadingComponent {...props} /> : <span className="loading" />} </div> ); export default Loading;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I suggest adding a prop for a custom loading, just like errorComponent. Or adding an "on load" function to know when the file has finished loading.
e.g. file-viewer.jsx
Add these
e.g. loading.jsx
Could look like this
The text was updated successfully, but these errors were encountered: