add lib translate texts
This commit is contained in:
parent
fc4d89f77e
commit
45a36f4736
23 changed files with 298 additions and 14 deletions
|
@ -0,0 +1 @@
|
|||
<p>filters-group works!</p>
|
|
@ -0,0 +1,23 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FiltersGroup } from './filters-group';
|
||||
|
||||
describe('FiltersGroup', () => {
|
||||
let component: FiltersGroup;
|
||||
let fixture: ComponentFixture<FiltersGroup>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [FiltersGroup]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(FiltersGroup);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,11 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'lib-filters-group',
|
||||
imports: [],
|
||||
templateUrl: './filters-group.html',
|
||||
styleUrl: './filters-group.css'
|
||||
})
|
||||
export class FiltersGroup {
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
<div class="translate-texts">
|
||||
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
|
||||
<!-- delete button from_text-->
|
||||
<button class="delete-button button" (click)="emptyText('fromText')">x</button>
|
||||
<textarea name="from_text" id="from_text" cols="30" rows="10" [(ngModel)]="fromText"></textarea>
|
||||
</div>
|
||||
<div class="column">
|
||||
|
||||
<button class="delete-button button" (click)="emptyText('toText')">x</button>
|
||||
<textarea name="from_text" id="from_text" cols="30" rows="10" [(ngModel)]="toText"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,23 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TranslateTexts } from './translate-texts';
|
||||
|
||||
describe('TranslateTexts', () => {
|
||||
let component: TranslateTexts;
|
||||
let fixture: ComponentFixture<TranslateTexts>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [TranslateTexts]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TranslateTexts);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,19 @@
|
|||
import { Component } from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
|
||||
@Component({
|
||||
selector: 'lib-translate-texts',
|
||||
imports: [
|
||||
FormsModule
|
||||
],
|
||||
templateUrl: './translate-texts.html',
|
||||
styleUrl: './translate-texts.css'
|
||||
})
|
||||
export class TranslateTexts {
|
||||
public fromText : string = ''
|
||||
public toText : 'fromText' | 'toText' | '' = ''
|
||||
|
||||
emptyText(someText: 'fromText' | 'toText'){
|
||||
this[someText] = '';
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue