Skip to content

Commit 49a9e70

Browse files
committed
added proper typing for icon class names
1 parent 29158b6 commit 49a9e70

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

app/components/Button/Base.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
<script setup lang="ts">
2+
type StartIcon =
3+
| `i-carbon:${string}`
4+
| `i-lucide:${string}`
5+
| `i-simple-icons:${string}`
6+
| `i-svg-spinners:${string}`
7+
| `i-custom:${string}`
8+
29
const props = withDefaults(
310
defineProps<{
411
disabled?: boolean
@@ -8,7 +15,7 @@ const props = withDefaults(
815
ariaKeyshortcuts?: string
916
block?: boolean
1017
11-
classicon?: string
18+
classicon?: StartIcon
1219
}>(),
1320
{
1421
type: 'button',

app/pages/package/[[org]]/[name].vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,9 @@ const { copied: copiedPkgName, copy: copyPkgName } = useClipboard({
245245
})
246246
247247
//copy version name
248+
//orginally only copied name and not version number
248249
const { copied: copiedVersion, copy: copyVersion } = useClipboard({
249-
source: resolvedVersion.value ?? '',
250+
source: () => resolvedVersion.value ?? '',
250251
copiedDuring: 2000,
251252
})
252253

0 commit comments

Comments
 (0)