Skip to content

Commit

Permalink
fix(angular-material): added padding on "mat cards"
Browse files Browse the repository at this point in the history
  • Loading branch information
JBBianchi committed Dec 19, 2023
1 parent 6ec6c9d commit 19af601
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ import {
first as first
"
>
<mat-card appearance="outlined">
<mat-card class="array-item" appearance="outlined">
<mat-card-content>
<jsonforms-outlet [renderProps]="getProps(idx)"></jsonforms-outlet>
</mat-card-content>
Expand Down Expand Up @@ -154,6 +154,9 @@ import {
.array-layout-toolbar > span {
flex: 1 1 auto;
}
.array-item {
padding: 16px;
}
::ng-deep .error-message-tooltip {
white-space: pre-line;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import { JsonFormsAngularService } from '@jsonforms/angular';
display: flex;
flex-direction: column;
gap: 16px;
padding: 16px;
}
.group-layout > div {
flex: 1 1 auto;
Expand Down
9 changes: 8 additions & 1 deletion packages/angular-material/src/other/object.renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import { cloneDeep } from 'lodash';
@Component({
selector: 'ObjectRenderer',
template: `
<mat-card appearance="outlined">
<mat-card class="object-layout" appearance="outlined">
<jsonforms-outlet
[uischema]="detailUiSchema"
[schema]="scopedSchema"
Expand All @@ -54,6 +54,13 @@ import { cloneDeep } from 'lodash';
</jsonforms-outlet>
</mat-card>
`,
styles: [
`
.object-layout {
padding: 16px;
}
`,
],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ObjectControlRenderer extends JsonFormsControlWithDetail {
Expand Down

0 comments on commit 19af601

Please sign in to comment.