Skip to content

Commit

Permalink
fix: Misalignment and Excessive Padding in Relation Card (#8292)
Browse files Browse the repository at this point in the history
## 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 <[email protected]>
  • Loading branch information
harshit078 and Bonapara authored Nov 8, 2024
1 parent 61cdc0e commit d44f7a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const StyledPropertyBoxContainer = styled.div`
flex-direction: column;
gap: ${({ theme }) => theme.spacing(2)};
padding: ${({ theme }) => theme.spacing(3)};
padding-right: ${({ theme }) => theme.spacing(2)};
`;

export const PropertyBox = ({ children, className }: PropertyBoxProps) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`
align-items: center;
cursor: pointer;
Expand Down Expand Up @@ -233,7 +241,7 @@ export const RecordDetailRelationRecordsListItem = ({
)}
</StyledListItem>
<AnimatedEaseInOut isOpen={isExpanded}>
<PropertyBox>
<StyledPropertyBox>
{availableRelationFieldMetadataItems.map(
(fieldMetadataItem, index) => (
<FieldContext.Provider
Expand All @@ -258,7 +266,7 @@ export const RecordDetailRelationRecordsListItem = ({
</FieldContext.Provider>
),
)}
</PropertyBox>
</StyledPropertyBox>
</AnimatedEaseInOut>
</>
);
Expand Down

0 comments on commit d44f7a4

Please sign in to comment.