No changes detected in diff

No code was added or removed in the provided diff; only context lines were present.
This commit is contained in:
2026-02-02 10:14:15 +01:00
parent 75846573da
commit eda30472b9
97 changed files with 7 additions and 28 deletions

View File

@@ -0,0 +1,9 @@
<mat-form-field class="example-form-field">
<mat-label>{{label}}</mat-label>
<input matInput type="text" [(ngModel)]="value">
@if (value) {
<button matSuffix mat-icon-button aria-label="Clear" (click)="value=''">
<mat-icon>close</mat-icon>
</button>
}
</mat-form-field>

View File

@@ -0,0 +1,7 @@
.mat-stepper-vertical {
margin-top: 8px;
}
.mat-mdc-form-field {
margin-top: 16px;
}

View File

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

View File

@@ -0,0 +1,18 @@
import {Component, Input} from '@angular/core';
import {MatIconModule} from '@angular/material/icon';
import {MatButtonModule} from '@angular/material/button';
import {FormsModule} from '@angular/forms';
import {MatInputModule} from '@angular/material/input';
import {MatFormFieldModule} from '@angular/material/form-field';
@Component({
selector: 'clearable-input',
standalone: true,
imports: [MatFormFieldModule, MatInputModule, FormsModule, MatButtonModule, MatIconModule],
templateUrl: './clearable-input.component.html',
styleUrl: './clearable-input.component.scss'
})
export class ClearableInputComponent {
@Input() public value: string = '';
@Input() public label: string = '';
}