Skip to content

Commit 39758e3

Browse files
alokybenjamincanac
andauthored
fix(PageHeaderLinks): replace UButtonGroup with UFieldGroup in template (#266)
Co-authored-by: Benjamin Canac <[email protected]>
1 parent 42124ab commit 39758e3

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

app/components/PageHeaderLinks.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ const route = useRoute()
55
const toast = useToast()
66
const { copy, copied } = useClipboard()
77
const site = useSiteConfig()
8-
const isCopying = ref(false)
9-
console.log(site)
108
119
const mdPath = computed(() => `${site.url}/raw${route.path}.md`)
1210
@@ -43,20 +41,17 @@ const items = [
4341
]
4442
4543
async function copyPage() {
46-
isCopying.value = true
4744
copy(await $fetch<string>(`/raw${route.path}.md`))
48-
isCopying.value = false
4945
}
5046
</script>
5147

5248
<template>
53-
<UButtonGroup>
49+
<UFieldGroup>
5450
<UButton
5551
label="Copy page"
5652
:icon="copied ? 'i-lucide-copy-check' : 'i-lucide-copy'"
5753
color="neutral"
5854
variant="outline"
59-
:loading="isCopying"
6055
:ui="{
6156
leadingIcon: [copied ? 'text-primary' : 'text-neutral', 'size-3.5']
6257
}"
@@ -78,7 +73,8 @@ async function copyPage() {
7873
size="sm"
7974
color="neutral"
8075
variant="outline"
76+
aria-label="Open copy actions menu"
8177
/>
8278
</UDropdownMenu>
83-
</UButtonGroup>
79+
</UFieldGroup>
8480
</template>

0 commit comments

Comments
 (0)