feat: add circled icone component
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<div class="circle" [style.backgroundColor]="backgroundColor()">
|
||||||
|
<mw-svg width="75%" height="75%" [color]="color()" [symbol]="symbol()"></mw-svg>
|
||||||
|
</div>
|
||||||
@@ -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();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -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("");
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user