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,26 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
standalone: true,
imports: [],
selector: 'app-root',
template: `
<main class="flex h-screen items-center justify-center">
<div
class="flex w-full max-w-screen-sm flex-col items-center gap-y-8 p-4">
<button
class="rounded bg-indigo-600 px-4 py-2 font-bold text-white transition-colors ease-in-out hover:bg-indigo-700">
Hold me
</button>
<progress [value]="20" [max]="100"></progress>
</div>
</main>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AppComponent {
onSend() {
console.log('Save it!');
}
}

View File

@@ -0,0 +1,5 @@
import { ApplicationConfig } from '@angular/core';
export const appConfig: ApplicationConfig = {
providers: [],
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>rxjs-hold-to-save-btn</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<app-root></app-root>
</body>
</html>

View File

@@ -0,0 +1,7 @@
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app/app.component';
import { appConfig } from './app/app.config';
bootstrapApplication(AppComponent, appConfig).catch((err) =>
console.error(err),
);

View File

@@ -0,0 +1,14 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
progress {
@apply h-4 w-full rounded-full bg-gray-200;
}
progress::-webkit-progress-bar {
@apply rounded-full bg-gray-200;
}
progress::-webkit-progress-value {
@apply rounded-full bg-indigo-600;
}

View File

@@ -0,0 +1,2 @@
import '@testing-library/jest-dom';
import 'jest-preset-angular/setup-jest';