Skip to content

Commit ca829b1

Browse files
PD-5705 Fixed the description for deep select input other type (#2849)
Co-authored-by: Angel Montenegro <a.montenegro@orcid.org>
1 parent dda80b8 commit ca829b1

2 files changed

Lines changed: 27 additions & 11 deletions

File tree

src/app/cdk/deep-select-input/deep-select-input/deep-select-input.component.html

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,16 @@
6666
[ngClass]="subItem.secondaryItem ? 'secondaryItem' : ''"
6767
class="mat-button-wrap-text"
6868
>
69-
{{ subItem.label }}
69+
<span class="menu-item-content">
70+
<span class="menu-item-label">{{ subItem.label }}</span>
7071

71-
<p
72-
class="orc-font-small-print"
73-
*ngIf="subItem.description"
74-
>
75-
{{ subItem.description }}
76-
</p>
72+
<p
73+
class="orc-font-small-print"
74+
*ngIf="subItem.description"
75+
>
76+
{{ subItem.description }}
77+
</p>
78+
</span>
7779
</button>
7880
</ng-container>
7981
<ng-container *ngIf="subItem.divider">
@@ -110,11 +112,13 @@
110112
[ngClass]="subItem.secondaryItem ? 'secondaryItem' : ''"
111113
class="mobile mat-button-wrap-text"
112114
>
113-
{{ subItem.label }}
115+
<span class="menu-item-content">
116+
<span class="menu-item-label">{{ subItem.label }}</span>
114117

115-
<p class="orc-font-small-print" *ngIf="subItem.description">
116-
{{ subItem.description }}
117-
</p>
118+
<p class="orc-font-small-print" *ngIf="subItem.description">
119+
{{ subItem.description }}
120+
</p>
121+
</span>
118122
</button>
119123
</ng-container>
120124
</ng-container>

src/app/cdk/deep-select-input/deep-select-input/deep-select-input.component.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,18 @@ button.mat-button-wrap-text.secondaryItem {
8282
font-style: italic;
8383
height: 100%;
8484
padding: 16px 16px !important;
85+
.menu-item-content {
86+
display: flex;
87+
flex-direction: column;
88+
align-items: flex-start;
89+
justify-content: center;
90+
white-space: normal;
91+
line-height: 1.2;
92+
width: 100%;
93+
}
94+
.menu-item-label {
95+
display: block;
96+
}
8597
p {
8698
margin: 0;
8799
padding-top: 4px;

0 commit comments

Comments
 (0)