-
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.
Merge pull request #62 from Sphereon-Opensource/feat/CWALL-250
feature/CWALL-250
- Loading branch information
Showing
7 changed files
with
202 additions
and
11 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
41 changes: 41 additions & 0 deletions
41
packages/ssi-react/src/components/views/ContactViewItem/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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React, {FC} from 'react'; | ||
import {CredentialRole, IImageAttributes} from '@sphereon/ssi-sdk.data-store'; | ||
import SSILogo from '../../assets/logos/SSILogo'; | ||
import { | ||
ContactViewItemContactDetailsContainerStyled as ContactDetailsContainer, | ||
SSITextH3Styled as ContactNameCaption, | ||
SSITextH4Styled as ContactRolesCaption, | ||
ContactViewItemContactUriCaptionStyled as ContactUriCaption, | ||
ContactViewItemContainerStyled as Container, | ||
ContactViewItemLogoContainerStyled as LogoContainer, | ||
ContactViewItemNewStatusContainerStyled as StatusContainer, | ||
} from '../../../styles'; | ||
import {fontColors} from "@sphereon/ui-components.core"; | ||
|
||
export interface Props { | ||
name: string; | ||
uri?: string; | ||
logo?: IImageAttributes; | ||
roles: Array<CredentialRole>; | ||
} | ||
|
||
const ContactViewItem: FC<Props> = (props: Props): JSX.Element => { | ||
const {name, uri, roles, logo} = props; | ||
return ( | ||
<Container> | ||
<StatusContainer /> | ||
<LogoContainer> | ||
<SSILogo logo={logo} color={fontColors.dark}/> | ||
</LogoContainer> | ||
<div> | ||
<ContactDetailsContainer> | ||
<ContactNameCaption>{name}</ContactNameCaption> | ||
<ContactRolesCaption>{roles.join(', ')}</ContactRolesCaption> | ||
</ContactDetailsContainer> | ||
<ContactUriCaption>{uri}</ContactUriCaption> | ||
</div> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default ContactViewItem; |
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
31 changes: 31 additions & 0 deletions
31
packages/ssi-react/src/styles/components/components/ContactViewItem/index.ts
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,31 @@ | ||
import styled from 'styled-components' | ||
import {SSIFlexDirectionRowViewStyled} from '../../containers'; | ||
import {SSITextH5Styled} from '../../../fonts'; | ||
|
||
export const ContactViewItemContainerStyled = styled(SSIFlexDirectionRowViewStyled)` | ||
padding: 16px 24px 18px 7px; | ||
`; | ||
|
||
export const ContactViewItemNewStatusContainerStyled = styled.div` | ||
height: 10px; | ||
width: 17px; | ||
margin: auto 0; | ||
`; | ||
|
||
export const ContactViewItemLogoContainerStyled = styled.div` | ||
width: 78px; | ||
margin: 2.5px 4px 2.5px 0; | ||
align-items: center; | ||
justify-content: center; | ||
`; | ||
|
||
export const ContactViewItemContactDetailsContainerStyled = styled.div` | ||
margin-bottom: 6px; | ||
`; | ||
|
||
// TODO we need to have a color here and not use opacity for colors | ||
// opacity: 0.8; | ||
// TODO move color | ||
export const ContactViewItemContactUriCaptionStyled = styled(SSITextH5Styled)` | ||
color: #4F4F4F; | ||
`; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.