From e50b62df8feec259eeb34a5dcaf9c33d6c8ecebd Mon Sep 17 00:00:00 2001 From: Suman Sahoo Date: Fri, 5 Jan 2024 15:37:49 +0530 Subject: [PATCH] Loading more UI updated (#3198) * style update * inlcude box as a table element * Ui Loading more fixed * changes tbody added with ref with margin and padding with theme variables * Remove unused react fragment --------- Co-authored-by: Charles Bochet --- .../RecordTableBodyFetchMoreLoader.tsx | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableBodyFetchMoreLoader.tsx b/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableBodyFetchMoreLoader.tsx index 337494aec2..9590bc6865 100644 --- a/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableBodyFetchMoreLoader.tsx +++ b/packages/twenty-front/src/modules/object-record/record-table/components/RecordTableBodyFetchMoreLoader.tsx @@ -1,10 +1,12 @@ import { useInView } from 'react-intersection-observer'; +import styled from '@emotion/styled'; import { useRecoilCallback, useRecoilValue } from 'recoil'; import { useObjectRecordTable } from '@/object-record/hooks/useObjectRecordTable'; import { StyledRow } from '@/object-record/record-table/components/RecordTableRow'; import { useRecordTable } from '@/object-record/record-table/hooks/useRecordTable'; import { isFetchingMoreRecordsFamilyState } from '@/object-record/states/isFetchingMoreRecordsFamilyState'; +import { grayScale } from '@/ui/theme/constants/colors'; export const RecordTableBodyFetchMoreLoader = () => { const { queryStateIdentifier } = useObjectRecordTable(); @@ -25,15 +27,26 @@ export const RecordTableBodyFetchMoreLoader = () => { onChange: onLastRowVisible, }); + const StyledText = styled.div` + align-items: center; + box-shadow: none; + color: ${grayScale.gray40}; + display: flex; + height: 32px; + margin-left: ${({ theme }) => theme.spacing(8)}; + padding-left: ${({ theme }) => theme.spacing(2)}; + `; + return ( - {isFetchingMoreObjects ? ( + {!isFetchingMoreObjects && ( - - Loading more... + + Loading more... + - ) : null} + )} ); };