File tree Expand file tree Collapse file tree 3 files changed +46
-1
lines changed
src/components/Dashboard/SlowQueries Expand file tree Collapse file tree 3 files changed +46
-1
lines changed Original file line number Diff line number Diff line change @@ -89,3 +89,16 @@ export const Default: Story = {
8989 }
9090 }
9191} ;
92+
93+ export const Empty : Story = {
94+ args : {
95+ data : {
96+ data : {
97+ totalCount : 0 ,
98+ entries : [ ]
99+ } ,
100+ type : "SlowQuery" ,
101+ error : null
102+ }
103+ }
104+ } ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { Pagination } from "../../common/Pagination";
99import { Toggle } from "../../common/Toggle" ;
1010import { ToggleValue } from "../../common/Toggle/types" ;
1111import { Tooltip } from "../../common/Tooltip" ;
12+ import { LightBulbSmallCrossedIcon } from "../../common/icons/LightBulbSmallCrossedIcon" ;
1213import { SnailIcon } from "../../common/icons/SnailIcon" ;
1314import { WarningCircleLargeIcon } from "../../common/icons/WarningCircleLargeIcon" ;
1415import { actions } from "../actions" ;
@@ -190,7 +191,12 @@ export const SlowQueries = (props: SlowQueriesProps) => {
190191 { error }
191192 </ s . ErrorMessage >
192193 ) : (
193- < span > No data</ span >
194+ < >
195+ < s . EmptyStateIconContainer >
196+ < LightBulbSmallCrossedIcon color = { "currentColor" } size = { 72 } />
197+ </ s . EmptyStateIconContainer >
198+ < span > No data</ span >
199+ </ >
194200 ) }
195201 </ s . EmptyStateContainer >
196202 ) : (
Original file line number Diff line number Diff line change @@ -113,8 +113,34 @@ export const EmptyStateContainer = styled.div`
113113 flex-direction: column;
114114 align-items: center;
115115 justify-content: center;
116+ gap: 8px;
116117 font-size: 14px;
117118 flex-grow: 1;
119+ color: #dadada;
120+ ` ;
121+
122+ export const EmptyStateIconContainer = styled . div `
123+ width: 72px;
124+ height: 72px;
125+ border-radius: 50%;
126+ color: ${ ( { theme } ) => {
127+ switch ( theme . mode ) {
128+ case "light" :
129+ return "#fbfdff" ;
130+ case "dark" :
131+ case "dark-jetbrains" :
132+ return "#9b9b9b" ;
133+ }
134+ } } ;
135+ background: ${ ( { theme } ) => {
136+ switch ( theme . mode ) {
137+ case "light" :
138+ return "#d0d6eb" ;
139+ case "dark" :
140+ case "dark-jetbrains" :
141+ return "#323334" ;
142+ }
143+ } } ;
118144` ;
119145
120146export const ErrorMessage = styled . span `
You can’t perform that action at this time.
0 commit comments