mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-29 14:16:36 +00:00
Allow customising hero-icon size using HTML attributes
This commit is contained in:
parent
9a63b62cf4
commit
79b33cea1c
@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
:host ::content .icon {
|
:host ::content .icon {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
height: 40px;
|
|
||||||
width: 40px;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="icon"></div>
|
<div class="icon"></div>
|
||||||
@ -32,6 +30,12 @@
|
|||||||
properties: {
|
properties: {
|
||||||
path: {
|
path: {
|
||||||
type: String
|
type: String
|
||||||
|
},
|
||||||
|
width: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: String
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ready: function() {
|
ready: function() {
|
||||||
@ -40,7 +44,10 @@
|
|||||||
var contents = fs.readFileSync(imagePath, {
|
var contents = fs.readFileSync(imagePath, {
|
||||||
encoding: 'utf8'
|
encoding: 'utf8'
|
||||||
});
|
});
|
||||||
|
|
||||||
iconElement.innerHTML = contents;
|
iconElement.innerHTML = contents;
|
||||||
|
iconElement.style.width = this.width || '40px';
|
||||||
|
iconElement.style.height = this.height || '40px';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user