Skip to content

Commit

Permalink
fix(components): same height for person cards
Browse files Browse the repository at this point in the history
  • Loading branch information
FussuChalice authored Jan 12, 2025
1 parent 7f98e15 commit 9c9dd7f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
19 changes: 16 additions & 3 deletions src/components/user_card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,22 @@ const UserCard = ({
{female ? <UserCardFemaleImg /> : <UserCardMaleImg />}
</StyledImgContainer>
<StyledBoxSpaceBetween flexDirection="column">
<StyledBoxSpaceBetween flexDirection="row">
<StyledBoxSpaceBetween flexDirection="column">
<Typography className="h4">{name}</Typography>
<StyledBoxSpaceBetween flexDirection="row" sx={{ gap: '12px' }}>
<StyledBoxSpaceBetween
flexDirection="column"
sx={{
justifyContent: 'center',
}}
>
<Typography
className="h4"
sx={{
whiteSpace: 'wrap',
marginBottom: '4px',
}}
>
{name}
</Typography>
</StyledBoxSpaceBetween>
{type === 'person' && onDelete && (
<StyledBox
Expand Down
3 changes: 3 additions & 0 deletions src/components/user_card/user_card.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import { styled } from '@mui/system';

export const StyledCardBox = styled(Box)({
width: '100%',
height: '100%',
'.MuiCard-root': {
borderRadius: '8px',
boxShadow: 'none',
height: '100%',
border: '1px solid var(--accent-300)',
'&:hover': {
background: 'var(--accent-100)',
Expand Down Expand Up @@ -50,6 +52,7 @@ export const StyledBoxSpaceBetween = styled(Box)<{
}>(({ flexDirection }) => ({
display: 'flex',
width: '100%',
overflow: 'hidden',
flexDirection: flexDirection,
justifyContent: 'space-between',
}));
Expand Down

0 comments on commit 9c9dd7f

Please sign in to comment.