Skip to content

Commit

Permalink
Merge pull request #9 from ravikp/change-VC-share-screen-UI
Browse files Browse the repository at this point in the history
Change VC UI in sharing ID screen.
  • Loading branch information
Alka1703 authored Mar 6, 2023
2 parents 32cf0b4 + e72867d commit b5ff5de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 48 deletions.
38 changes: 3 additions & 35 deletions components/SingleVcItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,6 @@ const VerifiedIcon: React.FC = () => {
};

const getDetails = (arg1, arg2, verifiableCredential) => {
if (arg1 === 'Full Name') {
return (
<Column>
<Text color={Theme.Colors.DetailsLabel} size="smaller">
{arg1}
</Text>
<Text
numLines={4}
color={Theme.Colors.Details}
weight="bold"
size="smaller"
style={
!verifiableCredential
? Theme.Styles.loadingTitle
: Theme.Styles.subtitle
}>
{!verifiableCredential ? '' : arg2}
</Text>
</Column>
);
}
if (arg1 === 'Status') {
return (
<Column>
Expand Down Expand Up @@ -79,7 +58,7 @@ const getDetails = (arg1, arg2, verifiableCredential) => {
{arg1}
</Text>
<Text
numLines={1}
numLines={4}
color={Theme.Colors.Details}
weight="bold"
size="smaller"
Expand Down Expand Up @@ -114,18 +93,9 @@ export const SingleVcItem: React.FC<VcItemProps> = (props) => {
? ''
: getLocalizedField(verifiableCredential.credentialSubject.fullName);

const selectableOrCheck = props.selectable ? (
<CheckBox
checked={props.selected}
checkedIcon={<Icon name="radio-button-checked" />}
uncheckedIcon={<Icon name="radio-button-unchecked" />}
onPress={() => props.onPress(service)}
/>
) : null;

return (
<Pressable
style={Theme.Styles.closeCardBgContainer}
style={Theme.Styles.selectedBindedVc}
onPress={() => props.onPress(service)}>
<ImageBackground
source={!verifiableCredential ? null : Theme.CloseCard}
Expand Down Expand Up @@ -170,9 +140,7 @@ export const SingleVcItem: React.FC<VcItemProps> = (props) => {
</Column>
</Column>

{verifiableCredential ? (
selectableOrCheck
) : (
{!verifiableCredential && (
<RotatingIcon name="sync" color={Theme.Colors.rotatingIcon} />
)}
</Row>
Expand Down
13 changes: 1 addition & 12 deletions components/VcItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,6 @@ export const VcItem: React.FC<VcItemProps> = (props) => {
? ''
: getLocalizedField(verifiableCredential.credentialSubject.fullName);

const selectableOrCheck = props.selectable ? (
<CheckBox
checked={props.selected}
checkedIcon={<Icon name="radio-button-checked" />}
uncheckedIcon={<Icon name="radio-button-unchecked" />}
onPress={() => props.onPress(service)}
/>
) : null;

const tag = useSelector(service, selectTag);

return (
Expand Down Expand Up @@ -229,9 +220,7 @@ export const VcItem: React.FC<VcItemProps> = (props) => {
</Column>
</Column>

{verifiableCredential ? (
selectableOrCheck
) : (
{!verifiableCredential && (
<RotatingIcon name="sync" color={Theme.Colors.rotatingIcon} />
)}
</Row>
Expand Down
2 changes: 1 addition & 1 deletion components/ui/themes/DefaultTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const DefaultTheme = {
borderRadius: 10,
margin: 5,
borderWidth: 2,
borderColor: Colors.Orange,
borderColor: Colors.Green,
},
labelPartContainer: {
marginLeft: 16,
Expand Down

0 comments on commit b5ff5de

Please sign in to comment.