Fix word wrap with no white spaces for status

This commit is contained in:
Gabriel Brown 2024-07-30 10:24:08 -05:00
parent 6b80930a86
commit 0fbd0f7182
2 changed files with 12 additions and 1 deletions

View File

@ -97,7 +97,7 @@ const History_Drawer: React.FC<History_Drawer_Props> = ({ user_id }) => {
{history.map((entry, index) => ( {history.map((entry, index) => (
<TableRow key={index}> <TableRow key={index}>
<TableCell className="font-medium lg:max-w-[100px]">{entry.name}</TableCell> <TableCell className="font-medium lg:max-w-[100px]">{entry.name}</TableCell>
<TableCell className="font-medium lg:max-w-[100px]">{entry.status}</TableCell> <TableCell className="font-medium lg:max-w-[100px] wrapword">{entry.status}</TableCell>
<TableCell className="font-medium lg:max-w-[100px] justify-end items-end text-right">{new Date(entry.updatedAt).toLocaleString()}</TableCell> <TableCell className="font-medium lg:max-w-[100px] justify-end items-end text-right">{new Date(entry.updatedAt).toLocaleString()}</TableCell>
</TableRow> </TableRow>
))} ))}

View File

@ -134,3 +134,14 @@
.tablefill { .tablefill {
height: 10vh; height: 10vh;
} }
.wrapword {
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -webkit-pre-wrap; /* Chrome & Safari */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* CSS3 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
word-break: break-all;
white-space: normal;
}