Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix comment overflow and ensure content fits within div #8700

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/Components/Resource/CommentSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,16 @@ export const Comment = ({
}: IComment) => (
<div className="mt-4 flex w-full flex-col rounded-lg border border-secondary-300 bg-white p-4 text-secondary-800">
<div className="flex w-full">
<p className="text-justify">{comment}</p>
<p
className="text-justify"
style={{
whiteSpace: "normal",
wordBreak: "break-all",
overflowWrap: "break-word",
}}
>
{comment}
</p>
</div>
<div className="mt-3">
<span className="text-xs text-secondary-500">
Expand Down
11 changes: 10 additions & 1 deletion src/Components/Shifting/CommentsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,16 @@ export const Comment = ({
className="mt-4 flex w-full flex-col rounded-lg border border-secondary-300 bg-white p-4 text-secondary-800"
>
<div className="flex w-full">
<p className="text-justify">{comment}</p>
<p
className="text-justify"
style={{
whiteSpace: "normal",
wordBreak: "break-all",
overflowWrap: "break-word",
}}
>
{comment}
</p>
</div>
<div className="mt-3">
<span className="text-xs text-secondary-500">
Expand Down
Loading