Icon improvements:

- If Et2ButtonIcon image does not resolve to a egw image, treat it as a Shoelace icon name
- Add egw images as an icon library for Shoelace
eg: <sl-icon library="egw" name="5_day_view"/>
This commit is contained in:
nathan
2022-08-22 14:05:11 -06:00
parent ffb8354728
commit 0775fd1a4e
2 changed files with 16 additions and 4 deletions

View File

@ -28,11 +28,15 @@ export class Et2ButtonIcon extends ButtonMixin(Et2InputWidget(SlIconButton))
{
this.src = this.egw().image(new_image);
}
if(new_image && !this.src)
{
this.name = new_image;
}
}
get image()
{
return this.src;
return this.src || this.name;
}
}