Skip to content

Commit f4e12d5

Browse files
Selectable card style changes (#365)
Co-authored-by: tumms2021389 <[email protected]>
1 parent 89c0595 commit f4e12d5

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

packages/angular-sdk-components/src/lib/_components/field/selectable-card/selectable-card.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 40ch), 1fr)); grid-auto-rows: 1fr; gap: 0.5rem">
1+
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); grid-auto-rows: 1fr; gap: 0.5rem">
22
<div *ngFor="let cardContent of contentList">
33
<mat-card [ngStyle]="cardStyle" appearance="outlined" (click)="cardSelect($event, cardContent.commonCardProps)">
44
<img
@@ -34,7 +34,7 @@
3434
*ngFor="let field of cardContent.commonCardProps.fields"
3535
[ngStyle]="field.type !== 'TextArea' ? (field.name ? defaultStyle : noLabelStyle) : specialStyle"
3636
>
37-
<div style="color: rgba(0, 0, 0, 0.6)">{{ field.name }}</div>
37+
<div>{{ field.name }}</div>
3838
<div>{{ field?.value?.getPConnect().getConfigProps().value ?? '--' }}</div>
3939
</div>
4040
</mat-card-content>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
::ng-deep .mdc-label {
22
font-size: large;
33
}
4+
5+
.mat-mdc-card-content:last-child {
6+
padding-bottom: 0;
7+
}
8+
9+
.mat-mdc-card-content:first-child {
10+
padding-top: 0;
11+
}

packages/angular-sdk-components/src/lib/_components/field/selectable-card/selectable-card.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export class SelectableCardComponent extends FieldBase implements OnInit {
168168
alt: this.commonProps.image.showImageDescription && imageDescriptionKey ? item[imageDescriptionKey] : '',
169169
style: {
170170
width: imageWidth,
171-
backgroundColor: 'rgb(233, 238, 243)',
171+
backgroundColor: 'transparent',
172172
aspectRatio: '16/9',
173173
maxHeight: '100%',
174174
objectFit: 'contain',

0 commit comments

Comments
 (0)