add dynamic entry list component
This commit is contained in:
1 parent
6316051f66
commit
eecb1443ca
4 files changed
+52
No files matched your search
@@ -0,0 +1,16 @@
|
||||
|
||||
.movies-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(
|
||||
auto-fill,
|
||||
minmax(200px, 1fr)
|
||||
); /* Creates a responsive grid */
|
||||
gap: 20px; /* Space between items */
|
||||
/* padding: 20px;Padding around the grid */
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<!-- Entries Container/Grid -->
|
||||
<div class="movies-container">
|
||||
<app-main-card *ngFor="let entry of entries" [entry]="entry"></app-main-card>
|
||||
</div>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { DynamicEntryListComponent } from './dynamic-entry-list.component';
|
||||
|
||||
describe('DynamicEntryListComponent', () => {
|
||||
let component: DynamicEntryListComponent;
|
||||
let fixture: ComponentFixture<DynamicEntryListComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [DynamicEntryListComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(DynamicEntryListComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Entry } from '../../../shared/models/entry.model';
|
||||
|
||||
@Component({
|
||||
selector: 'app-dynamic-entry-list',
|
||||
templateUrl: './dynamic-entry-list.component.html',
|
||||
styleUrls: ['./dynamic-entry-list.component.css'],
|
||||
})
|
||||
export class DynamicEntryListComponent {
|
||||
@Input() entries: Entry[] = [];
|
||||
}
|
||||
Reference in new issue
Block a user