feat: card component

This commit is contained in:
2025-11-08 16:26:21 -03:00
parent cc85fec421
commit 5ac2e62daf
4 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
<div [style.backgroundColor]="bgColor()" class="card shadow">
<ng-content></ng-content>
</div>

View 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;
}

View 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();
});
});

View 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');
}