-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Display added credential as card
Signed-off-by: George J Padayatti <[email protected]>
- Loading branch information
1 parent
c3d6d12
commit a330351
Showing
5 changed files
with
74 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
height: 100%; | ||
|
||
.businessInfo { | ||
padding: 10px 0; | ||
padding: 10px; | ||
} | ||
|
||
.walletContainer { | ||
|
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
64 changes: 64 additions & 0 deletions
64
src/container/AddCredential/dataAttributeCardCredentials.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,64 @@ | ||
import React from "react"; | ||
import { Box, Typography } from "@mui/material"; | ||
|
||
const titleAttrRestrictionStyle = (isLastAttribute: boolean) => ({ | ||
fontWeight: "normal", | ||
margin: "10px 10px 5px 10px", | ||
borderBottom: isLastAttribute ? "none" : "solid 1px #dee2e6", | ||
lineHeight: "1.5rem", | ||
}); | ||
|
||
const tableAttrAdditionalInfoStyle = { | ||
border: 0, | ||
width: "100%", | ||
maxWidth: "100%", | ||
marginBottom: "0rem", | ||
backgroundColor: "#FFFF", | ||
}; | ||
|
||
interface Props { | ||
selectedData: any; | ||
} | ||
|
||
export const DataAttributeCardForDDA = (props: Props) => { | ||
const { selectedData } = props; | ||
|
||
return ( | ||
<Box | ||
style={{ | ||
marginTop: "10px", | ||
border: "1px solid #DFE0E1", | ||
borderRadius: 5, | ||
paddingTop: 10, | ||
paddingBottom: 10, | ||
}} | ||
> | ||
{selectedData?.map((attribute: any, index: number) => { | ||
const isLastAttribute = index === (selectedData?.length || 0) - 1; | ||
|
||
return ( | ||
<Box key={index} style={titleAttrRestrictionStyle(isLastAttribute)}> | ||
<table style={tableAttrAdditionalInfoStyle}> | ||
<tbody> | ||
<tr | ||
style={{ | ||
display: "flex", | ||
justifyContent: "space-between", | ||
alignItems: "center", | ||
}} | ||
> | ||
<Typography variant="subtitle2"> | ||
{attribute.attribute} | ||
</Typography> | ||
<Typography variant="subtitle2"> | ||
{attribute.value} | ||
</Typography> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</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