Sha256: 5e8decf1a2c4c19bd944229e4e4b1cc86b20f51699b57260c0bba9e234062a0b
Contents?: true
Size: 840 Bytes
Versions: 8
Compression:
Stored size: 840 Bytes
Contents
<template> <component v-bind:is="icon" v-bind="$attrs" viewBox="0 0 24 24" class="fill-current" :class="{ 'animate-spin': spin, 'animate-bounce': bounce }" :style="{ width: size, height: size }" ></component> </template> <script> import { defineAsyncComponent } from 'vue' export default { name: 'UIKitIcon', props: { name: { type: String }, size: { type: String, default: '1.25rem' }, spin: { type: Boolean, default: false }, bounce: { type: Boolean, default: false }, library: { type: String, default: 'remixicons' }, }, data() { return { icons: import.meta.glob(`../../assets/**/*.svg`), } }, computed: { icon() { return defineAsyncComponent(() => this.icons[`../../assets/${this.library}/${this.name}.svg`](), ) }, }, } </script>
Version data entries
8 entries across 8 versions & 1 rubygems