Skip to content

Commit

Permalink
[AAE-15236] Making about component panel styles configurable (#8660)
Browse files Browse the repository at this point in the history
* Rebasing

* AAE-15236: Fixing syntax
  • Loading branch information
ehsan-2019 committed Jun 14, 2023
1 parent 18c3eff commit 64f9d04
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 16 deletions.
6 changes: 3 additions & 3 deletions lib/core/src/lib/about/about.component.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<mat-accordion [togglePosition]="'before'">
<mat-accordion [togglePosition]="'before'" class="adf-about-panel">
<ng-container *ngFor="let panel of panels">
<mat-expansion-panel>
<mat-expansion-panel-header>
<mat-panel-title>{{panel.label}}</mat-panel-title>
<mat-expansion-panel-header class="adf-about-panel-header">
<mat-panel-title class="adf-about-panel-header__title">{{panel.label}}</mat-panel-title>
</mat-expansion-panel-header>
<ng-container *ngTemplateOutlet="panel.layoutTemplate"></ng-container>
</mat-expansion-panel>
Expand Down
9 changes: 9 additions & 0 deletions lib/core/src/lib/about/about.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.adf-about-panel {
&-header {
height: var(--adf-about-panel-header-height);

&__title {
color: var(--adf-about-panel-header-title-color);
}
}
}
1 change: 1 addition & 0 deletions lib/core/src/lib/about/about.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { AboutPanelDirective } from './about-panel.directive';
@Component({
selector: 'adf-about',
templateUrl: './about.component.html',
styleUrls: ['about.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class AboutComponent {
Expand Down
14 changes: 8 additions & 6 deletions lib/core/src/lib/styles/_components-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@

@mixin adf-components-variables() {
$defaults: (
--adf-edit-task-and-service-filter-header-title-color: $adf-ref-edit-task-and-service-filter-header-title-color,
--adf-edit-task-and-service-filter-header-description-color: $adf-ref-edit-task-and-service-filter-header-description-color,
--adf-edit-task-and-service-filter-content-text-label-color: $adf-ref-edit-task-and-service-filter-content-text-label-color,
--adf-edit-task-and-service-filter-content-select-label-color: $adf-ref-edit-task-and-service-filter-content-select-label-color,
--adf-edit-task-and-service-filter-header-height: $adf-ref-edit-task-and-service-filter-header-height,
--adf-card-view-background: $adf-ref-card-background,
--adf-card-view-border: $adf-ref-card-border,
--adf-card-view-border-color: $adf-ref-card-border-color,
--adf-card-view-border-radius: $adf-ref-card-border-radius
--adf-card-view-border-radius: $adf-ref-card-border-radius,
--adf-edit-task-and-service-filter-header-title-color: $adf-ref-title-color,
--adf-edit-task-and-service-filter-header-description-color: $adf-ref-description-color,
--adf-edit-task-and-service-filter-content-text-label-color: $adf-ref-text-field-label-color,
--adf-edit-task-and-service-filter-content-select-label-color: $adf-ref-select-field-label-color,
--adf-edit-task-and-service-filter-header-height: $adf-ref-height-48,
--adf-about-panel-header-height: $adf-ref-height-48,
--adf-about-panel-header-title-color: $adf-ref-title-color,
);

// propagates SCSS variables into the CSS variables scope
Expand Down
12 changes: 5 additions & 7 deletions lib/core/src/lib/styles/_reference-variables.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
$adf-ref-edit-task-and-service-filter-header-title-color: rgba(0, 0, 0, 0.87);
$adf-ref-edit-task-and-service-filter-header-description-color: rgba(0, 0, 0, 0.54);
$adf-ref-edit-task-and-service-filter-header-height: 48px;
$adf-ref-edit-task-and-service-filter-content-text-label-color: rgba(0, 0, 0, 0.54);
$adf-ref-edit-task-and-service-filter-content-text-input-color: rgba(0, 0, 0, 0.87);
$adf-ref-edit-task-and-service-filter-content-select-label-color: rgba(0, 0, 0, 0.54);
$adf-ref-edit-task-and-service-filter-content-select-input-color: rgba(0, 0, 0, 0.87);
$adf-ref-card-background: white;
$adf-ref-card-border: unset;
$adf-ref-card-border-color: unset;
$adf-ref-card-border-radius: 0;
$adf-ref-height-48: 48px;
$adf-ref-title-color: rgba(0, 0, 0, 0.87);
$adf-ref-description-color: rgba(0, 0, 0, 0.54);
$adf-ref-text-field-label-color: rgba(0, 0, 0, 0.54);
$adf-ref-select-field-label-color: rgba(0, 0, 0, 0.54);

0 comments on commit 64f9d04

Please sign in to comment.