feat: card component
This commit is contained in:
3
src/app/components/card/card.html
Normal file
3
src/app/components/card/card.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div [style.backgroundColor]="bgColor()" class="card shadow">
|
||||
<ng-content></ng-content>
|
||||
</div>
|
||||
11
src/app/components/card/card.scss
Normal file
11
src/app/components/card/card.scss
Normal file
@@ -0,0 +1,11 @@
|
||||
.card {
|
||||
max-width: 1100px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.shadow {
|
||||
-webkit-box-shadow: 0px 2px 9px 0px rgba(0, 0, 0, 0.7);
|
||||
-moz-box-shadow: 0px 2px 9px 0px rgba(0, 0, 0, 0.7);
|
||||
box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.5);
|
||||
border-radius: 10px;
|
||||
}
|
||||
23
src/app/components/card/card.spec.ts
Normal file
23
src/app/components/card/card.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { Card } from './card';
|
||||
|
||||
describe('Card', () => {
|
||||
let component: Card;
|
||||
let fixture: ComponentFixture<Card>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [Card]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(Card);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
11
src/app/components/card/card.ts
Normal file
11
src/app/components/card/card.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Component, input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-card',
|
||||
imports: [],
|
||||
templateUrl: './card.html',
|
||||
styleUrl: './card.scss',
|
||||
})
|
||||
export class Card {
|
||||
bgColor = input('white');
|
||||
}
|
||||
Reference in New Issue
Block a user