diff --git a/frontend/projects/upgrade/src/app/shared-standalone-component-lib/components/common-section-card/common-section-card.component.html b/frontend/projects/upgrade/src/app/shared-standalone-component-lib/components/common-section-card/common-section-card.component.html new file mode 100644 index 0000000000..53705852ad --- /dev/null +++ b/frontend/projects/upgrade/src/app/shared-standalone-component-lib/components/common-section-card/common-section-card.component.html @@ -0,0 +1,11 @@ +
+
+ +
+
+ +
+ +
diff --git a/frontend/projects/upgrade/src/app/shared-standalone-component-lib/components/common-section-card/common-section-card.component.scss b/frontend/projects/upgrade/src/app/shared-standalone-component-lib/components/common-section-card/common-section-card.component.scss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/frontend/projects/upgrade/src/app/shared-standalone-component-lib/components/common-section-card/common-section-card.component.spec.ts b/frontend/projects/upgrade/src/app/shared-standalone-component-lib/components/common-section-card/common-section-card.component.spec.ts new file mode 100644 index 0000000000..f157b95967 --- /dev/null +++ b/frontend/projects/upgrade/src/app/shared-standalone-component-lib/components/common-section-card/common-section-card.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CommonSectionCardComponent } from './common-section-card.component'; + +describe('CommonSectionCardComponent', () => { + let component: CommonSectionCardComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [CommonSectionCardComponent] + }) + .compileComponents(); + + fixture = TestBed.createComponent(CommonSectionCardComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/frontend/projects/upgrade/src/app/shared-standalone-component-lib/components/common-section-card/common-section-card.component.ts b/frontend/projects/upgrade/src/app/shared-standalone-component-lib/components/common-section-card/common-section-card.component.ts new file mode 100644 index 0000000000..8cc3d04ffd --- /dev/null +++ b/frontend/projects/upgrade/src/app/shared-standalone-component-lib/components/common-section-card/common-section-card.component.ts @@ -0,0 +1,31 @@ +import { CommonModule } from '@angular/common'; +import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; + +/** + * A component nested in this component can be displayed in the **header**, **content** or **footer** slot. + * The **header** slot should contain a component that wraps a **app-common-section-card-header**. + * The **content** slot should contain a component that wraps a **app-common-section-card-content**. + * The **footer** slot should contain a component that wraps a **app-common-section-card-footer**. + * Simply nest the component and add the slot name as an attribute. + * + * Example usage: + * + * ``` + * + *
Hi I'm in the header slot
+ *
Hi I'm in the content slot
+ *
Hi I'm in the content slot
+ *
+ * ``` + */ +@Component({ + selector: 'app-common-section-card', + standalone: true, + imports: [CommonModule, TranslateModule], + templateUrl: './common-section-card.component.html', + styleUrl: './common-section-card.component.scss', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class CommonSectionCardComponent { +}