fix: Misalignment and Excessive Padding in Relation Card (#8292)

## Description

- This PR solves the issue #8249 
- Maintained the overall padding, aligned content to left matching and
decreased Spacing between the card title and content should be smaller

## Changes

<img width="346" alt="Screenshot 2024-11-03 at 2 37 13 AM"
src="https://github.com/user-attachments/assets/91ba35bb-ff25-4001-af15-1fa10e5e1772">

---------

Co-authored-by: Thomas des Francs <tdesfrancs@gmail.com>
This commit is contained in:
Harshit Singh
2024-11-08 19:40:15 +05:30
committed by GitHub
parent 61cdc0e6da
commit d44f7a46b6
2 changed files with 11 additions and 2 deletions

View File

@ -12,6 +12,7 @@ export const StyledPropertyBoxContainer = styled.div`
flex-direction: column; flex-direction: column;
gap: ${({ theme }) => theme.spacing(2)}; gap: ${({ theme }) => theme.spacing(2)};
padding: ${({ theme }) => theme.spacing(3)}; padding: ${({ theme }) => theme.spacing(3)};
padding-right: ${({ theme }) => theme.spacing(2)};
`; `;
export const PropertyBox = ({ children, className }: PropertyBoxProps) => ( export const PropertyBox = ({ children, className }: PropertyBoxProps) => (

View File

@ -62,6 +62,14 @@ const StyledListItem = styled(RecordDetailRecordsListItem)<{
} }
`; `;
const StyledPropertyBox = styled(PropertyBox)`
align-items: flex-start;
display: flex;
padding-left: ${({ theme }) => theme.spacing(0)};
padding-top: ${({ theme }) => theme.spacing(1)};
padding-right: ${({ theme }) => theme.spacing(0)};
`;
const StyledClickableZone = styled.div` const StyledClickableZone = styled.div`
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
@ -233,7 +241,7 @@ export const RecordDetailRelationRecordsListItem = ({
)} )}
</StyledListItem> </StyledListItem>
<AnimatedEaseInOut isOpen={isExpanded}> <AnimatedEaseInOut isOpen={isExpanded}>
<PropertyBox> <StyledPropertyBox>
{availableRelationFieldMetadataItems.map( {availableRelationFieldMetadataItems.map(
(fieldMetadataItem, index) => ( (fieldMetadataItem, index) => (
<FieldContext.Provider <FieldContext.Provider
@ -258,7 +266,7 @@ export const RecordDetailRelationRecordsListItem = ({
</FieldContext.Provider> </FieldContext.Provider>
), ),
)} )}
</PropertyBox> </StyledPropertyBox>
</AnimatedEaseInOut> </AnimatedEaseInOut>
</> </>
); );