【revuekitz】ImgIcon
■ 概要(Overview)
コンポーネント名
- ImgIcon
レベル (Atomic Design)
- Atoms(原子)
カテゴリー(Category)
- Icons
■ データ(Data)
【props】
id
(string): 識別用のIDclass
(string): クラス名style
(string): インラインスタイルimgFile
(string): 表示する画像のファイルパスsize
(string): アイコンのサイズ ('128', '64', '32', '18' のいずれか、デフォルトは '64')alt
(string): 画像の代替テキスト
【computed】
bindingSize
:props.size
に基づいてアイコンのサイズとスタイルを設定
■ 使用例(Usecase)
<script setup lang="ts">
import { ImgIcon } from 'revuekitz'
import 'revuekitz/dist/style.css'
</script>
<template>
<ImgIcon
id="imgIconId"
class="img-icon-class"
style="border: 2px solid #000;"
imgFile="path/to/image.png"
size="128"
alt="Example Image"
/>
</template>