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:
booploops 2022-06-28 14:34:01 -07:00
parent 530d73ba81
commit 5309c987f0
5 changed files with 226 additions and 193 deletions

View file

@ -7,6 +7,7 @@ import {Events} from './events.js'
import { wsapi } from "./wsapi_interop.js"
import { MusicKitTools } from "./musickittools.js"
import { spawnMica } from "./mica.js"
import { svgIcon } from './components/svg-icon.js'
// Define window objects

View 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"
}
}
})