ngx-dynamic-toast 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/fesm2022/ngx-dynamic-toast.mjs +664 -0
- package/fesm2022/ngx-dynamic-toast.mjs.map +1 -0
- package/package.json +17 -4
- package/types/ngx-dynamic-toast.d.ts +218 -0
- package/ng-package.json +0 -7
- package/src/lib/constants.ts +0 -18
- package/src/lib/dynamic-toast-viewport.component.html +0 -24
- package/src/lib/dynamic-toast-viewport.component.ts +0 -121
- package/src/lib/dynamic-toast.component.html +0 -148
- package/src/lib/dynamic-toast.component.ts +0 -515
- package/src/lib/dynamic-toast.service.ts +0 -346
- package/src/lib/icons.ts +0 -26
- package/src/lib/index.ts +0 -34
- package/src/lib/styles.css +0 -580
- package/src/lib/toast.ts +0 -38
- package/src/lib/types.ts +0 -75
- package/src/public-api.ts +0 -10
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
package/README.md
CHANGED
|
@@ -23,19 +23,33 @@ import { DynamicToastService } from "ngx-dynamic-toast";
|
|
|
23
23
|
@Component({
|
|
24
24
|
selector: "app-root",
|
|
25
25
|
standalone: true,
|
|
26
|
-
template:
|
|
26
|
+
template: `
|
|
27
|
+
<button (click)="showToast()">Show Toast</button>
|
|
28
|
+
<dt-viewport></dt-viewport>
|
|
29
|
+
`,
|
|
27
30
|
})
|
|
28
31
|
export class AppComponent {
|
|
29
32
|
private toastService = inject(DynamicToastService);
|
|
30
33
|
|
|
31
34
|
showToast() {
|
|
32
|
-
this.toastService.success(
|
|
35
|
+
this.toastService.success({
|
|
36
|
+
title: "Hello World!",
|
|
33
37
|
description: "This is a beautifully animated toast notification.",
|
|
34
38
|
});
|
|
35
39
|
}
|
|
36
40
|
}
|
|
37
41
|
```
|
|
38
42
|
|
|
43
|
+
## Advanced Examples
|
|
44
|
+
|
|
45
|
+
Check out the [examples/example-usage.component.ts](examples/example-usage.component.ts) file for a complete demonstration of:
|
|
46
|
+
|
|
47
|
+
- Success, Error, Warning, and Info toasts.
|
|
48
|
+
- Toasts with action buttons.
|
|
49
|
+
- Promise-based toasts (loading -> success/error).
|
|
50
|
+
- Different viewport positions.
|
|
51
|
+
- Custom durations and styling.
|
|
52
|
+
|
|
39
53
|
## License
|
|
40
54
|
|
|
41
55
|
MIT - See the Sileo repository for original conceptual licensing.
|