Skip to content

onSrcUpdate

onSrcUpdate(prevSrc, src): { attrs?: undefined; id?: undefined; } | { attrs: { height: string; viewBox: string; width: string; }; id: string; } | { attrs?: undefined; id: string; }

Defined in: svg-symbols.ts:28

Should be called whenever image source is updated, and component is mounted.

Previous symbol source code, i.e. value of import "./my/image.svg". If there’s no previous source, pass undefined.

string | undefined

string

Symbol source code, i.e. value of import "./my/image.svg"

{ attrs?: undefined; id?: undefined; } | { attrs: { height: string; viewBox: string; width: string; }; id: string; } | { attrs?: undefined; id: string; }

Attributes that should be bound to the <svg> tag. These attributes should override attributes bound by the user.