Skip to content
New issue

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

Utilize EuiEmptyPrompt to represent empty state #320

Merged
merged 3 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import React, { useEffect, useState } from 'react';
import { EuiSplitPanel, EuiTitle, EuiFlexGroup, EuiPanel } from '@elastic/eui';
import { EuiSplitPanel, EuiEmptyPrompt, EuiPanel } from '@elastic/eui';

import { QueryError, SearchResults } from '../../../../types/index';
import { ResultPanel } from './result_panel';
Expand All @@ -26,11 +26,13 @@ const InitialState = () => {
grow={true}
style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}
>
<EuiFlexGroup justifyContent="center">
<EuiTitle>
<h2>Add queries to compare search results.</h2>
</EuiTitle>
</EuiFlexGroup>
<EuiEmptyPrompt
iconType="search"
title={<h2>No results</h2>}
body={
<p>Add at least one query to display search results.</p>
}
/>
</EuiPanel>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
EuiFlexGroup,
EuiFlexItem,
EuiHorizontalRule,
EuiEmptyPrompt,
} from '@elastic/eui';

import { ResultGridComponent } from './result_grid';
Expand Down Expand Up @@ -70,7 +71,15 @@ export const ResultPanel = ({ resultNumber, queryResult, queryError }: ResultPan
) : (
<>
<EuiHorizontalRule margin="s" />
<EuiText>No results.</EuiText>
<EuiEmptyPrompt
iconType="search"
title={<h2>No results</h2>}
body={
<>
<p>Add a second query to display search comparison results.</p>
</>
}
/>
</>
)}
</EuiSplitPanel.Inner>
Expand Down
Loading