feat: add circled icone component

This commit is contained in:
2025-08-18 16:21:07 -03:00
parent f38c1edc4c
commit 1862341e77
4 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
.circle {
border-radius: 50%;
height: 100%;
width: 100%;
display: flex;
mw-svg {
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
}
}

View File

@@ -0,0 +1,3 @@
<div class="circle" [style.backgroundColor]="backgroundColor()">
<mw-svg width="75%" height="75%" [color]="color()" [symbol]="symbol()"></mw-svg>
</div>

View File

@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CircledIconComponent } from './circled-icon.component';
describe('CircledIconComponent', () => {
let component: CircledIconComponent;
let fixture: ComponentFixture<CircledIconComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [CircledIconComponent]
})
.compileComponents();
fixture = TestBed.createComponent(CircledIconComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,15 @@
import { Component, input } from '@angular/core';
import { SvgComponent } from '../../atoms/svg/svg.component';
@Component({
selector: 'mw-circled-icon',
standalone: true,
imports: [SvgComponent],
templateUrl: './circled-icon.component.html',
styleUrl: './circled-icon.component.css'
})
export class CircledIconComponent {
backgroundColor = input("#fff");
color = input("#000000");
symbol = input("");
}