import { Add as AddIcon } from '@mui/icons-material'; import { Typography as MuiTypography } from '@mui/material'; import type { ReactElement } from 'react'; import { useTranslation } from 'react-i18next'; import { Button } from '../../Button'; import { useStyles } from './DataTableEmptyState.styles'; type ListEmptyStateProps = { canCreate?: boolean; labels: { actions?: { create: string; }; title: string; description?: string; }; onCreate?: () => void; buttonCreateTestId?: string; }; const DataTableEmptyState = ({ labels, onCreate, canCreate = true, buttonCreateTestId }: ListEmptyStateProps): ReactElement => { const { classes } = useStyles(); const { t } = useTranslation(); return (
{t(labels.title)} {labels.description && ( {t(labels.description)} )}
{canCreate && ( )}
); }; export { DataTableEmptyState };