added <svg-icon/>
params: - url: string - url of the svg icon - name: string - the icon's name to help with theming
This commit is contained in:
parent
530d73ba81
commit
5309c987f0
5 changed files with 226 additions and 193 deletions
16
src/renderer/main/components/svg-icon.js
Normal file
16
src/renderer/main/components/svg-icon.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
export const svgIcon = Vue.component("svg-icon", {
|
||||
template: `
|
||||
<div class="_svg-icon" :svg-name="name" :style="{'--icon': 'url(' + url + ')'}"></div>
|
||||
`,
|
||||
props: {
|
||||
name: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
url: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: "./assets/repeat.svg"
|
||||
}
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue