notificaion: support icon transform suffixes (use utils.icons())
This commit is contained in:
parent
7e7c3f43e7
commit
d22f850598
2 changed files with 9 additions and 1 deletions
|
|
@ -1,5 +1,11 @@
|
|||
# Changelog
|
||||
|
||||
|
||||
## 1.30.4
|
||||
|
||||
- bug fixes
|
||||
- remote control: add support for icon transform suffixes
|
||||
|
||||
## 1.30.3
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
import html from 'nanohtml'
|
||||
import raw from 'nanohtml/raw'
|
||||
import morph from 'nanomorph'
|
||||
import UiWidget from './ui-widget.mjs'
|
||||
import {DOM, ENV} from '../globals.mjs'
|
||||
import {icon} from './utils'
|
||||
|
||||
|
||||
var DEFAULT_DURATION = 3500
|
||||
|
|
@ -21,7 +23,7 @@ class Toast {
|
|||
|
||||
var toast = html`
|
||||
<div class="toast ${data.class || ''}" data-id="${data.id}">
|
||||
<i class="fa fa-fw fa-${data.icon || (data.class === 'error' ? 'exclamation' : 'bell')}"></i>
|
||||
${raw(icon(data.icon || (data.class === 'error' ? 'exclamation' : 'bell')))}
|
||||
<div class="content"></div>
|
||||
</div>
|
||||
`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue