Skip to content

Commit b070507

Browse files
committed
feat: add button group
1 parent 886c60e commit b070507

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

app/components/Button/Group.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<template>
2+
<nav
3+
class="flex items-center shrink-0 ms-auto [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none"
4+
>
5+
<slot />
6+
</nav>
7+
</template>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -644,10 +644,10 @@ onKeyStroke(
644644
</div>
645645

646646
<!-- Internal navigation: Docs + Code + Compare (hidden on mobile, shown in external links instead) -->
647-
<nav
647+
<ButtonGroup
648648
v-if="resolvedVersion"
649649
:aria-label="$t('package.navigation')"
650-
class="hidden sm:flex items-center gap-0.5 p-0.5 bg-bg-subtle border border-border-subtle rounded-md shrink-0 ms-auto self-center"
650+
class="hidden sm:flex"
651651
>
652652
<LinkBase
653653
variant="button-secondary"
@@ -674,7 +674,7 @@ onKeyStroke(
674674
>
675675
{{ $t('package.links.compare') }}
676676
</LinkBase>
677-
</nav>
677+
</ButtonGroup>
678678
</div>
679679
</header>
680680

0 commit comments

Comments
 (0)