refactor: move libs

This commit is contained in:
thomas
2024-05-11 21:27:33 +02:00
parent 4a3c7f23e0
commit 001d35731a
659 changed files with 775 additions and 1573 deletions

View File

@@ -0,0 +1,10 @@
import { render } from '@testing-library/angular';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
describe('When checking the checkbox', () => {
it('Then button is enabled', async () => {
await render(AppComponent);
});
});
});

View File

@@ -0,0 +1,29 @@
import { Component } from '@angular/core';
@Component({
standalone: true,
selector: 'app-root',
template: `
<label for="agree">Agreed</label>
<input
class="ml-2"
id="agree"
type="checkbox"
[value]="check"
(input)="toggleCheck()" />
<button
class="ml-10 rounded-lg border p-2"
[class.bg-gray-500]="!check"
[class.text-white]="!check"
[disabled]="!check">
Submit
</button>
`,
})
export class AppComponent {
check = false;
toggleCheck() {
this.check = !this.check;
}
}