Skip to content

Commit

Permalink
FWF-9879:[Feature]Added no records page
Browse files Browse the repository at this point in the history
  • Loading branch information
fahad-aot committed Nov 15, 2024
1 parent 98f5efe commit 8d0e4c5
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react';
import { useTranslation } from 'react-i18next';

export const NoDataFound: React.FC = () => {
const { t } = useTranslation();

return (
<tbody className="no-data-body">
<tr>
<td colSpan={2} className="no-data-container">
<span className="no-data-text">{t("Nothing is found. Please try again.")}</span>
</td>
</tr>
</tbody>
);
};
1 change: 1 addition & 0 deletions forms-flow-components/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ export * from "./CustomComponents/TableFooter";
export * from "./CustomComponents/CustomInfo";
export * from "./CustomComponents/BuildModal";
export * from "./CustomComponents/ErrorModal";
export * from "./CustomComponents/NoDataFound";
21 changes: 19 additions & 2 deletions forms-flow-theme/scss/_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ $status-radius: 50%;
border-collapse: separate !important;
border-spacing: 0 !important;
border-radius: var(--radius-0150) !important;
table-layout: fixed;

th,
td {
Expand Down Expand Up @@ -182,7 +181,25 @@ $status-radius: 50%;
justify-content: space-between;
width: 100%;
}
.text-ellipsis{
.text-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
}

.no-data-body {
.no-data-container {
display: flex;
padding: var(--spacer-200) !important ;
justify-content: center;
align-items: center;
gap: var(--spacer-100);
flex: 1 0 0;
.no-data-text {
color: var(--ff-gray-400);
text-align: center;
font-size: var(--font-size-xs);
font-weight: var(--font-weight-sm);
line-height: var(--text-line-height);
}
}
}

0 comments on commit 8d0e4c5

Please sign in to comment.