feat: svg atom
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<svg [attr.width]="width()" [attr.height]="height()" [attr.fill]="color()">
|
||||
<use [attr.href]="'/assets/fonts/remixicon.symbol.svg#'+symbol()"></use>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 157 B |
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SvgComponent } from './svg.component';
|
||||
|
||||
describe('SvgComponent', () => {
|
||||
let component: SvgComponent;
|
||||
let fixture: ComponentFixture<SvgComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [SvgComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(SvgComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
15
projects/my-wallet-ds/src/lib/atoms/svg/svg.component.ts
Normal file
15
projects/my-wallet-ds/src/lib/atoms/svg/svg.component.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Component, input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'mw-svg',
|
||||
standalone: true,
|
||||
imports: [],
|
||||
templateUrl: './svg.component.html',
|
||||
styles: ``
|
||||
})
|
||||
export class SvgComponent {
|
||||
width = input("24px");
|
||||
height = input("24px");
|
||||
color = input("#000000");
|
||||
symbol = input("");
|
||||
}
|
||||
Reference in New Issue
Block a user