Create: Widget Header in the Loading State #2042 (#2048)

* create a visual loading state with header

* updates loading with WidgetHeader component

* chore: onview and ondelete is updated

Co-authored-by: Palash Gupta <palashgdev@gmail.com>
This commit is contained in:
Fellipe Montes 2023-01-17 03:07:30 -03:00 committed by GitHub
parent 972bf94dd0
commit d1cc29e118
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,7 +246,18 @@ function GridCardGraph({
(state.loading === true || state.payload === undefined) &&
!isEmptyLayout
) {
return <Spinner height="20vh" tip="Loading..." />;
return (
<>
<WidgetHeader
parentHover={hovered}
title={widget?.title}
widget={widget}
onView={handleOnView}
onDelete={handleOnDelete}
/>
<Spinner height="20vh" tip="Loading..." />
</>
);
}
return (