Skip to content

Commit 64c2017

Browse files
committed
feat: add IconClass typing to icon props
1 parent 6c6e274 commit 64c2017

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/components/CollapsibleSection.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<script setup lang="ts">
22
import { shallowRef, computed } from 'vue'
33
import { LinkBase } from '#components'
4+
import type { IconClass } from '../types/icon'
45
56
interface Props {
67
title: string
78
subtitle?: string
89
isLoading?: boolean
910
headingLevel?: `h${number}`
1011
id: string
11-
icon?: string
12+
icon?: IconClass
1213
}
1314
1415
const props = withDefaults(defineProps<Props>(), {

app/components/Diff/SidebarPanel.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import { packageRoute } from '~/utils/router'
3+
import type { IconClass } from '../../types/icon'
34
45
const props = defineProps<{
56
compare: CompareResponse
@@ -19,7 +20,7 @@ const fileFilter = defineModel<'all' | 'added' | 'removed' | 'modified'>('fileFi
1920
2021
const sectionOrder = ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies']
2122
const { t } = useI18n()
22-
const sectionMeta = computed<Record<string, { label: string; icon: string }>>(() => ({
23+
const sectionMeta = computed<Record<string, { label: string; icon: IconClass }>>(() => ({
2324
dependencies: { label: t('compare.dependencies'), icon: 'i-lucide:box' },
2425
devDependencies: { label: t('compare.dev_dependencies'), icon: 'i-lucide:wrench' },
2526
peerDependencies: { label: t('compare.peer_dependencies'), icon: 'i-lucide:users' },

0 commit comments

Comments
 (0)