commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<image class="app-icon" :class="muted ? 'muted-icon' : ''" :style="iconStyle" :src="iconSrc" mode="aspectFit"></image>
|
||||
</template>
|
||||
|
||||
<script setup lang="uts">
|
||||
const props = defineProps({ name: { type: String, default: 'sparkles' }, size: { type: Number, default: 42 }, muted: { type: Boolean, default: false } })
|
||||
const iconSrc = computed(() => '/static/icons-generated/' + props.name + '.png')
|
||||
const iconStyle = computed(() => 'width:' + props.size + 'rpx;height:' + props.size + 'rpx;')
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.app-icon { display: block; flex-shrink: 0; transform: scale(1.2); }.muted-icon { opacity: .48; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user