chore: Empty state refactor (#31860)

This commit is contained in:
Maxime Beauchemin
2025-01-22 13:20:38 -08:00
committed by GitHub
parent 7482b20f7b
commit fcd166149c
48 changed files with 530 additions and 658 deletions

View File

@@ -30,7 +30,7 @@ import {
VizType,
} from '@superset-ui/core';
import { Logger, LOG_ACTIONS_RENDER_CHART } from 'src/logger/LogUtils';
import { EmptyStateBig, EmptyStateSmall } from 'src/components/EmptyState';
import { EmptyState } from 'src/components/EmptyState';
import { ChartSource } from 'src/types/ChartSource';
import ChartContextMenu from './ChartContextMenu/ChartContextMenu';
@@ -308,7 +308,8 @@ class ChartRenderer extends Component {
const noResultImage = 'chart.svg';
if (width > BIG_NO_RESULT_MIN_WIDTH && height > BIG_NO_RESULT_MIN_HEIGHT) {
noResultsComponent = (
<EmptyStateBig
<EmptyState
size="large"
title={noResultTitle}
description={noResultDescription}
image={noResultImage}
@@ -316,7 +317,7 @@ class ChartRenderer extends Component {
);
} else {
noResultsComponent = (
<EmptyStateSmall title={noResultTitle} image={noResultImage} />
<EmptyState size="small" title={noResultTitle} image={noResultImage} />
);
}