I am using the progress-ring
LWC component from https://github.com/texei/progress-ring and fail to make the SLDS SVG Icon displayed dynamic work:
Usage:
<c-progress-ring ... icon="symbols.svg#warning"></c-progress-ring>
HTML:
<template if:true={icon}>
<span class="slds-icon_container slds-icon-utility" title={state}>
<svg class="slds-icon" aria-hidden="true">
<use xlink:href="/assets/icons/utility-sprite/svg/{icon}"></use>
</svg>
<span class="slds-assistive-text">{state}</span>
</span>
</template>
JS:
import { LightningElement, api, track } from "lwc";
export default class ProgressRing extends LightningElement {
@api min;
@api max;
@api icon;
...
}