-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Shakira M <[email protected]> Co-authored-by: Shakira M <[email protected]> Co-authored-by: Darshan Simha <[email protected]>
- Loading branch information
1 parent
22a30cf
commit ea57745
Showing
12 changed files
with
181 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import HelpIcon from "@mui/icons-material/Help"; | ||
import { HTMLlTooltip } from "../../../utils"; | ||
export const Help = ({ tooltip }) => { | ||
return ( | ||
<HTMLlTooltip title={tooltip} arrow> | ||
<HelpIcon | ||
sx={{ | ||
fontSize: 14, | ||
alignItems: "right", | ||
color: "#b2b2b2", | ||
}} | ||
/> | ||
</HTMLlTooltip> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 33 additions & 4 deletions
37
ui/src/components/common/SummaryPageLayout/partials/SummaryTitledValue/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,55 @@ | ||
import React from "react"; | ||
import Box from "@mui/material/Box"; | ||
import { Help } from "../../../Help"; | ||
|
||
import "./style.css"; | ||
|
||
export interface SummaryTitledValueProps { | ||
title: string; | ||
value: string | number; | ||
tooltip?: string; | ||
} | ||
|
||
export function SummaryTitledValue({ title, value }: SummaryTitledValueProps) { | ||
export function SummaryTitledValue({ | ||
title, | ||
value, | ||
tooltip, | ||
}: SummaryTitledValueProps) { | ||
return ( | ||
<Box | ||
sx={{ | ||
display: "flex", | ||
flexDirection: "column", | ||
flexDirection: "row", | ||
alignItems: "center", | ||
flexGrow: 1, | ||
justifyContent: "center", | ||
}} | ||
> | ||
<span className="summary-titled-value-title">{title}</span> | ||
<span className="summary-titled-value-value">{value}</span> | ||
<Box | ||
sx={{ | ||
display: "flex", | ||
flexDirection: "column", | ||
flexGrow: 1, | ||
paddingLeft: "1rem" | ||
}} | ||
> | ||
<span className="summary-titled-value-title">{title}</span> | ||
<span className="summary-titled-value-value">{value}</span> | ||
</Box> | ||
{tooltip && ( | ||
<Box | ||
sx={{ | ||
display: "flex", | ||
flexDirection: "row", | ||
alignItems: "right", | ||
height: "100%", | ||
justifyContent: "flex-end", | ||
marginRight: "1rem", | ||
}} | ||
> | ||
<Help tooltip={tooltip} /> | ||
</Box> | ||
)} | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.