mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-13 14:23:02 -05:00
refactor: move libs
This commit is contained in:
26
apps/rxjs/49-hold-to-save-button/src/app/app.component.ts
Normal file
26
apps/rxjs/49-hold-to-save-button/src/app/app.component.ts
Normal 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!');
|
||||
}
|
||||
}
|
||||
5
apps/rxjs/49-hold-to-save-button/src/app/app.config.ts
Normal file
5
apps/rxjs/49-hold-to-save-button/src/app/app.config.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { ApplicationConfig } from '@angular/core';
|
||||
|
||||
export const appConfig: ApplicationConfig = {
|
||||
providers: [],
|
||||
};
|
||||
BIN
apps/rxjs/49-hold-to-save-button/src/favicon.ico
Normal file
BIN
apps/rxjs/49-hold-to-save-button/src/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
13
apps/rxjs/49-hold-to-save-button/src/index.html
Normal file
13
apps/rxjs/49-hold-to-save-button/src/index.html
Normal 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>
|
||||
7
apps/rxjs/49-hold-to-save-button/src/main.ts
Normal file
7
apps/rxjs/49-hold-to-save-button/src/main.ts
Normal 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),
|
||||
);
|
||||
14
apps/rxjs/49-hold-to-save-button/src/styles.scss
Normal file
14
apps/rxjs/49-hold-to-save-button/src/styles.scss
Normal 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;
|
||||
}
|
||||
2
apps/rxjs/49-hold-to-save-button/src/test-setup.ts
Normal file
2
apps/rxjs/49-hold-to-save-button/src/test-setup.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
import '@testing-library/jest-dom';
|
||||
import 'jest-preset-angular/setup-jest';
|
||||
Reference in New Issue
Block a user