generated from bcgov/EPIC.scaffold
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
COMP-328: Requirement information display+Delete button style (front)
- Loading branch information
1 parent
456f82d
commit 1f67843
Showing
4 changed files
with
240 additions
and
188 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
compliance-web/src/components/App/Inspections/Profile/Requirements/GridLabelValuePair.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Grid, Typography, Tooltip } from "@mui/material"; | ||
import { BCDesignTokens } from "epic.theme"; | ||
import { FC, ReactNode, memo } from "react"; | ||
|
||
const GridLabelValuePair: FC<{ | ||
label: string; | ||
value: ReactNode; | ||
gridProps?: { xs: number }; | ||
}> = memo(({ label, value, gridProps = { xs: 12 } }) => ( | ||
<Grid item {...gridProps}> | ||
<Typography | ||
variant="body2" | ||
color={BCDesignTokens.typographyColorPlaceholder} | ||
> | ||
{label} | ||
</Typography> | ||
<Tooltip title={value}> | ||
<Typography | ||
variant="body1" | ||
sx={{ | ||
overflow: "hidden", | ||
textOverflow: "ellipsis", | ||
whiteSpace: "nowrap", | ||
}} | ||
> | ||
{value} | ||
</Typography> | ||
</Tooltip> | ||
</Grid> | ||
)); | ||
|
||
export default GridLabelValuePair; |
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.