Skip to content

Commit

Permalink
Remove width from parent as it is uneccassary
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishawdeep-Singh committed Dec 29, 2024
1 parent daf58e4 commit dc53ca4
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 33 deletions.
62 changes: 32 additions & 30 deletions src/app/molecules/room-profile/RoomProfile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,39 +184,41 @@ function RoomProfile({ roomId }) {
const renderNameAndTopic = () => (
<div
className="room-profile__display"
style={{ marginBottom: avatarSrc && canChangeAvatar ? '24px' : '0',width:"100%",maxWidth:"90%"}}
>
<div
style={{
wordWrap: "break-word",
width: "100%",
display: "flex",
flexDirection: "column",
alignItems: "flex-start",
}}
>
<Text
style={{
width: "100%",
whiteSpace: "normal",
wordBreak: "break-word",
marginBottom: avatarSrc && canChangeAvatar ? '24px' : '0',
}}
variant="h2"
weight="medium"
primary
>
{roomName}
</Text>
{(canChangeName || canChangeTopic) && (
<IconButton
src={PencilIC}
size="extra-small"
tooltip="Edit"
onClick={() => setIsEditing(true)}
style={{ marginTop: "8px" }}
/>
)}
</div>
<div
style={{
width: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
overflowWrap: 'break-word',
}}
>
<Text
style={{
width: '100%',
whiteSpace: 'normal',
wordBreak: 'break-word',
}}
variant="h2"
weight="medium"
primary
>
{roomName}
</Text>
{(canChangeName || canChangeTopic) && (
<IconButton
src={PencilIC}
size="extra-small"
tooltip="Edit"
onClick={() => setIsEditing(true)}
style={{ marginTop: '8px' }}
/>
)}
</div>
<Text variant="b3">{room.getCanonicalAlias() || room.roomId}</Text>
{roomTopic && (
<Text variant="b2">
Expand Down
6 changes: 3 additions & 3 deletions src/app/organisms/create-room/CreateRoom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
@include dir.prop(
border-radius,
var(--bo-radius) 0 0 var(--bo-radius),
0 var(--bo-radius) var(--bo-radius) 0,
0 var(--bo-radius) var(--bo-radius) 0
);
}
& .text:last-child {
@include dir.prop(border-width, 1px 1px 1px 0, 1px 0 1px 1px);
@include dir.prop(
border-radius,
0 var(--bo-radius) var(--bo-radius) 0,
var(--bo-radius) 0 0 var(--bo-radius),
var(--bo-radius) 0 0 var(--bo-radius)
);
}
}
Expand Down Expand Up @@ -98,4 +98,4 @@
text-align: center;
color: var(--bg-danger) !important;
}
}
}

0 comments on commit dc53ca4

Please sign in to comment.