Skip to content

Commit 6e857c3

Browse files
committed
feat: make simple toast handle multi line content better
1 parent 5051bfd commit 6e857c3

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

app-src/scripts/main/global-services/simple-toast-s.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,10 @@
6363
$mdToast.show({
6464
template: `
6565
<md-toast>
66-
<div class="md-toast-content">
67-
<div><ng-md-icon icon="${icon}" ${iconColor && 'style="fill:' + iconColor + '"'}></ng-md-icon>
68-
${textContent}
69-
</div>
70-
</div>
66+
<div class="md-toast-content">
67+
<ng-md-icon icon="${icon}" ${iconColor && 'style="fill:' + iconColor + '"'}></ng-md-icon>
68+
<div class="toast-text">${textContent}</div>
69+
</div>
7170
</md-toast>
7271
`,
7372
hideDelay: hideDelay || DEFAULT_HIDE_DELAY
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.md-toast-content{
2+
display: flex;
3+
flex-direction: row;
4+
ng-md-icon:first-child{
5+
margin-right: 10px;
6+
}
7+
}

app-src/styles/main.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ IMPORTANT NOTE:
7575

7676
@import 'components/_additions-for-ng-sortable.scss';
7777

78+
@import 'components/_additions-for-toasts.scss';
79+
7880
@import 'components/_fix-md-toast.scss';
7981

8082
@import 'components/_resytle-autocomplete.scss';

0 commit comments

Comments
 (0)