Skip to content

Commit 4494566

Browse files
committed
EIWFY23Q4-1 Add empty state for no validation issues
1 parent 578cfad commit 4494566

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/SchemaValidator.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import IconWarning from '@atlaskit/icon/glyph/warning';
77
import Table, { Cell, Row, SortableColumn, TBody, THead } from '@atlaskit/table';
88
import styled from 'styled-components';
99
import { MarkerSeverity } from './monaco-helpers';
10+
import EmptyState from "@atlaskit/empty-state";
11+
import EditorSuccessIcon from "@atlaskit/icon/glyph/editor/success";
1012

1113
type SchemaValidatorProps = {
1214
results: editor.IMarker[];
@@ -37,6 +39,14 @@ const severityDefinitions = {
3739
};
3840

3941
export const SchemaValidator: FC<SchemaValidatorProps> = ({ results, onSelectRange }) => {
42+
if (results.length === 0) {
43+
return (
44+
<EmptyState
45+
header="No validation issues!"
46+
renderImage={() => <EditorSuccessIcon size="xlarge" label="Success" primaryColor={colors.G300} />}
47+
/>
48+
);
49+
}
4050
const sortedByLineNumber = results.sort((a, b) => {
4151
if (a.startLineNumber !== b.startLineNumber) {
4252
return a.startLineNumber - b.startLineNumber;

0 commit comments

Comments
 (0)