feat: add empty state for Tags (#24702)

This commit is contained in:
Hugh A. Miles II 2023-07-26 20:24:25 -04:00 committed by GitHub
parent 4b1f1d49d6
commit e5d626c304
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

View File

@ -43,6 +43,21 @@ import { Tag as AntdTag } from 'antd';
import { Tag } from 'src/views/CRUD/types';
import TagCard from 'src/features/tags/TagCard';
const emptyState = {
title: t('No Tags created'),
image: 'dashboard.svg',
description:
'Create a new tag and assign it to existing entities like charts or dashboards',
buttonAction: () => {},
// todo(hughhh): Add this back once Tag modal is functional
// buttonText: (
// <>
// <i className="fa fa-plus" data-test="add-rule-empty" />{' '}
// {'Create a new Tag'}{' '}
// </>
// ),
};
const PAGE_SIZE = 25;
interface TagListProps {
@ -303,6 +318,7 @@ function TagList(props: TagListProps) {
count={tagCount}
data={tags.filter(tag => !tag.name.includes(':'))}
disableBulkSelect={toggleBulkSelect}
emptyState={emptyState}
fetchData={fetchData}
filters={filters}
initialSort={initialSort}