Skip to content

Commit

Permalink
design : room list 길면 말줄임표
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaeyeon1 committed Dec 10, 2024
1 parent c0c39a9 commit 66306b4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions frontend/app/_components/globalstyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default GlobalStyle;

export const ButtonStyled = styled.button<ButtonProps>`
width: 100%;
flex-shrink: 0;
background-color: ${({ theme, color }) =>
color === 'primary' ? theme.colors.primary : theme.colors.gray};
color: #fff;
Expand Down
15 changes: 7 additions & 8 deletions frontend/app/room/_related/room.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const CreateRoomButtonContainer = styled.button`
export const RoomListStyled = styled.li`
display: flex;
flex-direction: row;
justify-content: space-between;
width: 100%;
padding: 8px 12px;
Expand All @@ -51,9 +52,13 @@ export const RoomNumber = styled.h6`
export const RoomTitle = styled.h6`
color: #000;
font-size: 14px;
flex: 1;
margin: 0px;
font-weight: 400;
max-width: 70%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
`;

export const RoomListContainer = styled.div`
Expand All @@ -63,13 +68,7 @@ export const RoomListContainer = styled.div`
border-radius: 8px;
`;

export const RoomLeftContainer = styled(AlignCenterRowStack)`
display: flex;
flex-direction: row;
gap: 8px;
flex: 1;
`;
export const RoomRightContainer = styled(AlignCenterRowStack)`
export const RoomRightContainer = styled.div`
display: flex;
flex-direction: row;
gap: 12px;
Expand Down
11 changes: 6 additions & 5 deletions frontend/app/room/_sections/RoomList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { useContext } from 'react';
import {
PersonCount,
PersonCountContainer,
RoomLeftContainer,
RoomListStyled,
RoomRightContainer,
RoomTitle,
Expand All @@ -32,16 +31,18 @@ const RoomList = ({ room }: { room: RoomModel }) => {

return (
<RoomListStyled>
<RoomLeftContainer>
<RoomTitle>{room.Name}</RoomTitle>
</RoomLeftContainer>
<RoomTitle>{room.Name}</RoomTitle>
<RoomRightContainer>
<PersonCountContainer>
<PersonCount>{room.UserList?.length ?? 0}</PersonCount>
<PersonCount>/</PersonCount>
<PersonCount>{room.MaxUser}</PersonCount>
</PersonCountContainer>
<Button size='small' onClick={handleJoinRoom}>
<Button
style={{ width: 'fit-content' }}
size='small'
onClick={handleJoinRoom}
>
참가
</Button>
</RoomRightContainer>
Expand Down

0 comments on commit 66306b4

Please sign in to comment.