fix: prevent monitor URL and name overflow using MUI sx prop
This commit is contained in:
1 parent
1f6826e045
commit
e4ade39db7
5 files changed
+52
-24
No files matched your search
@@ -29,7 +29,12 @@ const Status = ({ monitor }) => {
|
||||
<Stack>
|
||||
<Typography
|
||||
variant="h1"
|
||||
className="monitor-name-text"
|
||||
sx={{
|
||||
maxWidth: "45vw",
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
whiteSpace: "nowrap",
|
||||
}}
|
||||
>
|
||||
{monitor?.name}
|
||||
</Typography>
|
||||
@@ -41,8 +46,14 @@ const Status = ({ monitor }) => {
|
||||
<PulseDot color={statusColor[determineState(monitor)]} />
|
||||
<Typography
|
||||
variant="h2"
|
||||
style={{ fontFamily: "monospace", fontWeight: "bolder" }}
|
||||
className="monitor-url-text"
|
||||
sx={{
|
||||
fontFamily: "monospace",
|
||||
fontWeight: "bolder",
|
||||
maxWidth: "60vw",
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis",
|
||||
whiteSpace: "nowrap",
|
||||
}}
|
||||
>
|
||||
{monitor?.url?.replace(/^https?:\/\//, "") || "..."}
|
||||
</Typography>
|
||||
|
||||
Reference in new issue
Block a user