file-widge:t add icon
This commit is contained in:
parent
1904e0fd32
commit
3dde1d0986
2 changed files with 8 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
|||
var Widget = require('../common/widget'),
|
||||
html = require('nanohtml'),
|
||||
{remoteBrowse} = require('../../ui/utils')
|
||||
raw = require('nanohtml/raw'),
|
||||
{remoteBrowse, icon} = require('../../ui/utils')
|
||||
|
||||
module.exports = class Input extends Widget {
|
||||
|
||||
|
|
@ -21,10 +22,10 @@ module.exports = class Input extends Widget {
|
|||
constructor(options) {
|
||||
|
||||
super({...options, html: html`
|
||||
<div class="file btn"><span></span></div>
|
||||
<div class="file btn">${raw(icon('folder-open'))}<span></span></div>
|
||||
`})
|
||||
|
||||
this.text = this.widget.firstChild
|
||||
this.text = DOM.get(this.widget, 'span')[0]
|
||||
this.widget.addEventListener('fast-click', (e)=>{
|
||||
|
||||
if (e.capturedByEditor === true) return
|
||||
|
|
|
|||
|
|
@ -216,6 +216,10 @@
|
|||
justify-content: center;
|
||||
padding: 0 10rem;
|
||||
text-transform: none;
|
||||
i {
|
||||
margin: 0 5rem;
|
||||
pointer-events: none;
|
||||
}
|
||||
span {
|
||||
pointer-events: none;
|
||||
text-overflow: ellipsis;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue