Skip to content

Commit 026974e

Browse files
tibing-old-emailnnixaa
authored andcommitted
refactor(theme): remove angular2-toaster styling (#721)
BREAKING CHANGE: angular2-toaster styles were removed from Nebular. Instead, we suggest using our new `NbToastrService`. To Update: Add `NbToastrModule` into imports of your `app.module`. Inject `NbToastrService` into the required component. call `NbToastrService.show(...)` to render toasts. For more information check [toastr documentation](https://akveo.github.io/nebular/docs/components/toastr).
1 parent 60a65cb commit 026974e

File tree

6 files changed

+3
-129
lines changed

6 files changed

+3
-129
lines changed

docs/articles/concept-3rd-party.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,11 @@
33
Currently Nebular Theme system is integrated with the following 3rd party modules:
44

55
- ng2-smart-table;
6-
- angular2-toaster.
76

87
It means that we've created style overriding for these modules, so that you can change component's look & feel using Nebular theme variables.
98
For example, if you change the `color-primary` variable, components using this color will be changed accordingly.
109

11-
12-
Or that's how we described variables for the `angular2-toaster` module:
13-
14-
```scss
15-
...
16-
toaster-bg: color-primary,
17-
toaster-fg-default: color-inverse,
18-
toaster-btn-close-bg: transparent,
19-
toaster-btn-close-fg: toaster-fg-default,
20-
toaster-shadow: shadow,
21-
22-
toaster-fg: color-white,
23-
toaster-success: color-success,
24-
toaster-info: color-info,
25-
toaster-warning: color-warning,
26-
toaster-wait: color-primary,
27-
toaster-error: color-danger,
28-
...
29-
30-
```
31-
<hr>
10+
<hr>
3211

3312
## Related Articles
3413

src/framework/theme/components/toastr/_toast.component.theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Licensed under the MIT License. See License.txt in the project root for license information.
55
*/
66

7-
@mixin nb-toaster-theme() {
7+
@mixin nb-toast-theme() {
88
nb-toast {
99
background-color: nb-theme(toastr-bg);
1010
padding: nb-theme(toastr-padding);

src/framework/theme/styles/global/_components.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
@include nb-popover-theme();
6767
@include nb-context-menu-theme();
6868
@include nb-select-theme();
69-
@include nb-toaster-theme();
69+
@include nb-toast-theme();
7070
@include nb-tooltip-theme();
7171
@include nb-window-theme();
7272
}

src/framework/theme/styles/global/_overrides.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
@import 'normalize.scss';
88
@import 'components/tree.theme';
9-
@import 'components/toaster.theme';
109
@import 'maps/leaflet.theme';
1110
@import 'tables/smart-table.theme';
1211

@@ -17,5 +16,4 @@
1716
@include nb-components-tree-theme();
1817
@include nb-maps-leaflet-theme();
1918
@include nb-tables-smart-table-theme();
20-
@include nb-components-toaster-theme();
2119
}

src/framework/theme/styles/global/components/_toaster.theme.scss

Lines changed: 0 additions & 90 deletions
This file was deleted.

src/framework/theme/styles/themes/_default.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -302,19 +302,6 @@ $theme: (
302302
smart-table-paging-bg-active: color-success,
303303
smart-table-paging-hover: rgba(0, 0, 0, 0.05),
304304

305-
toaster-bg: color-primary,
306-
toaster-fg-default: color-inverse,
307-
toaster-btn-close-bg: transparent,
308-
toaster-btn-close-fg: toaster-fg-default,
309-
toaster-shadow: shadow,
310-
311-
toaster-fg: color-white,
312-
toaster-success: color-success,
313-
toaster-info: color-info,
314-
toaster-warning: color-warning,
315-
toaster-wait: color-primary,
316-
toaster-error: color-danger,
317-
318305
toastr-bg: color-bg,
319306
toastr-padding: 1.125rem,
320307
toastr-fg: color-fg-text,

0 commit comments

Comments
 (0)