import LazyLoad from 'sentry/components/lazyLoad';
export default {
title: 'Utilities/Lazy Load',
component: LazyLoad,
};
export const _LazyLoad = () => {
const MyComponent = () => (
View that is loaded after 1000ms to simulate dynamic import
);
const getComponent = () =>
new Promise(resolve => setTimeout(() => resolve(MyComponent), 1000));
return ;
};
_LazyLoad.storyName = 'Lazy Load';
_LazyLoad.parameters = {
docs: {
description: {
story: 'Lazy loads a view/component',
},
},
};