Et2ButtonIcon: Fix icons didn't show

Must use SVGs here
This commit is contained in:
nathan 2022-08-22 13:45:06 -06:00
parent 263f2c867f
commit 1d5467faab
2 changed files with 17 additions and 0 deletions

View File

@ -17,7 +17,23 @@ import {ButtonMixin} from "./ButtonMixin";
export class Et2ButtonIcon extends ButtonMixin(Et2InputWidget(SlIconButton))
{
set image(new_image : string)
{
let oldValue = this.__src;
if(new_image.indexOf("http") >= 0 || new_image.indexOf(this.egw().webserverUrl) >= 0)
{
this.src = new_image
}
else
{
this.src = this.egw().image(new_image);
}
}
get image()
{
return this.src;
}
}
customElements.define("et2-button-icon", Et2ButtonIcon);

View File

@ -30,6 +30,7 @@ import './Layout/Et2Tabs/Et2TabPanel';
import './Et2Avatar/Et2Avatar';
import './Et2Avatar/Et2AvatarGroup';
import './Et2Button/Et2Button';
import './Et2Button/Et2ButtonIcon';
import './Et2Button/Et2ButtonTimestamper';
import './Et2Checkbox/Et2Checkbox';
import './Et2Checkbox/Et2CheckboxReadonly';