Skip to content

Commit

Permalink
fix: #921 fix user identity card style on mobile (#1119)
Browse files Browse the repository at this point in the history
  • Loading branch information
MCatherine1994 authored Jan 10, 2024
1 parent 4ab1af3 commit c60f28b
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 9 deletions.
50 changes: 50 additions & 0 deletions frontend/src/assets/styles/card.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
@use 'sass:map';
@use '@bcgov-nr/nr-theme/design-tokens/light-theme.scss' as lightTheme;

.p-card .p-card-header {
display: flex;
padding: 1.5rem;
align-items: center;

svg {
color: map.get(lightTheme.$light-theme, 'support-success');
margin-bottom: 0.1rem;
}

p {
margin: 0;
padding: 0 0 0 1rem !important;
display: inline-flex;
margin-bottom: 0;
color: map.get(lightTheme.$light-theme, 'text-primary');
font-size: 0.875rem;
font-style: normal;
font-weight: 700;
line-height: 1.125rem; /* 128.571% */
letter-spacing: 0.01rem;
}
}

.p-card .p-card-content {
display: flex;
padding: 0;
margin: 0;

div {
display: flex;
flex-direction: column;
align-self: center;
}

label {
color: map.get(lightTheme.$light-theme, 'text-primary');
margin: 0 0 0.75rem;
}

span {
margin: 0 !important;
font-size: 0.875rem;
line-height: 1.25rem;
letter-spacing: 0.01rem;
}
}
3 changes: 3 additions & 0 deletions frontend/src/components/grantaccess/ForestClientCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,6 @@ p * {
background-color: transparent !important;
}
</style>
<style lang="scss">
@import '@/assets/styles/card.scss';
</style>
18 changes: 9 additions & 9 deletions frontend/src/components/grantaccess/UserIdentityCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@ const props = defineProps<{
<p>Verified user information</p>
</template>
<template #content>
<div class="col-2">
<div class="col" style="margin-left: 2rem">
<label class="row">Username</label>
<span class="row">{{ props.userIdentity.userId }}</span>
</div>
<div class="col-2" v-if="props.userIdentity.found">
<div class="col" v-if="props.userIdentity.found">
<label class="row">First Name</label>
<span class="row">{{ props.userIdentity.firstName }}</span>
</div>
<div class="col-2" v-if="props.userIdentity.found">
<div class="col" v-if="props.userIdentity.found">
<label class="row">Last Name</label>
<span class="row">{{ props.userIdentity.lastName }}</span>
</div>
<div
class="col d-flex align-items-center"
class="col-6 d-flex"
v-if="!props.userIdentity.found"
>
<span class="px-0 invalid"> User does not exist </span>
Expand All @@ -50,10 +50,10 @@ const props = defineProps<{

<style lang="scss" scoped>
@import '@/assets/styles/styles.scss';
.col-2 {
margin-left: 2rem;
margin-right: 2.5rem;
flex-grow: 0;
.col {
margin-right: 0.5rem;
}
</style>
<style lang="scss">
@import '@/assets/styles/card.scss';
</style>

0 comments on commit c60f28b

Please sign in to comment.