Basisimplementierung Songlist
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<div [class.padding]="padding" class="card">
|
||||
<ng-content></ng-content>
|
||||
</div>
|
||||
12
src/app/widget-modules/components/card/card.component.less
Normal file
12
src/app/widget-modules/components/card/card.component.less
Normal file
@@ -0,0 +1,12 @@
|
||||
@import "../../../../styles/shadow";
|
||||
|
||||
.card {
|
||||
.card-3;
|
||||
margin: 20px;
|
||||
border-radius: 8px;
|
||||
background: #fffe;
|
||||
|
||||
&.padding {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
|
||||
import {CardComponent} from './card.component';
|
||||
|
||||
describe('CardComponent', () => {
|
||||
let component: CardComponent;
|
||||
let fixture: ComponentFixture<CardComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [CardComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CardComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
17
src/app/widget-modules/components/card/card.component.ts
Normal file
17
src/app/widget-modules/components/card/card.component.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import {Component, Input, OnInit} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-card',
|
||||
templateUrl: './card.component.html',
|
||||
styleUrls: ['./card.component.less']
|
||||
})
|
||||
export class CardComponent implements OnInit {
|
||||
@Input() padding = true;
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
14
src/app/widget-modules/components/card/card.module.ts
Normal file
14
src/app/widget-modules/components/card/card.module.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {CardComponent} from './card.component';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [CardComponent],
|
||||
exports: [CardComponent],
|
||||
imports: [
|
||||
CommonModule
|
||||
]
|
||||
})
|
||||
export class CardModule {
|
||||
}
|
||||
Reference in New Issue
Block a user