Skip to content

Commit 20755e3

Browse files
committed
fix: improve dialog-content and sheet-content component
1 parent 3692933 commit 20755e3

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

components/layout/Header.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ const config = useConfig()
88
:class="{ 'lg:border-b': config.header.border }"
99
>
1010
<div
11-
class="flex items-center justify-between px-4 md:px-8 h-14 gap-0.5"
11+
class="flex items-center justify-between px-4 md:px-8 h-14 gap-2"
1212
:class="{ 'border-b lg:border-none': config.header.border, 'container max-w-screen-2xl': config.main.padded }"
1313
>
1414
<LayoutHeaderLogo class="hidden flex-1 md:flex" />
1515
<LayoutMobileNav />
1616
<LayoutHeaderLogo v-if="config.header.showTitleInMobile" class="flex md:hidden" />
1717
<LayoutHeaderNav class="hidden flex-1 lg:flex" />
18-
<div class="flex flex-1 gap-0.5 justify-end">
18+
<div class="flex flex-1 gap-2 justify-end">
1919
<LayoutSearchButton v-if="!config.search.inAside && config.search.style === 'input'" />
2020
<LayoutSearchButton v-if="!config.search.inAside && config.search.style === 'button'" />
21-
<div class="inline-flex gap-0.5">
21+
<div class="inline-flex gap-2">
2222
<NButton
2323
v-for="(link, i) in config.header.links"
2424
:key="i"

components/ui/command/CommandSeparator.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const delegatedProps = computed(() => {
1616
<template>
1717
<ComboboxSeparator
1818
v-bind="delegatedProps"
19-
:class="cn('-mx-1 h-px bg-border', props.class)"
19+
:class="cn('-mx-1 h-px bg-$c-border', props.class)"
2020
>
2121
<slot />
2222
</ComboboxSeparator>

components/ui/dialog/DialogContent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
3939
<slot />
4040

4141
<DialogClose
42-
class="absolute right-4 top-4 ring-offset-base focus:ring-ring rounded-sm data-[state=open]:bg-accent data-[state=open]:text-muted opacity-70 transition-opacity disabled:pointer-events-none hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2"
42+
class="absolute right-4 top-4 ring-offset-base focus:ring-base rounded-sm data-[state=open]:bg-accent data-[state=open]:text-muted opacity-70 transition-opacity disabled:pointer-events-none hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2"
4343
>
4444
<Icon name="lucide:x" class="block size-4" />
4545
<span class="sr-only">Close</span>

components/ui/sheet/SheetContent.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script setup lang="ts">
22
import { cn } from '@/lib/utils'
33
import {
4+
DialogClose,
45
DialogContent,
56
type DialogContentEmits,
67
type DialogContentProps,
@@ -44,7 +45,11 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
4445
>
4546
<slot />
4647

47-
<NDialogClose />
48+
<DialogClose
49+
class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-base transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-base focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent"
50+
>
51+
<Icon name="lucide:x" class="block size-4" />
52+
</DialogClose>
4853
</DialogContent>
4954
</DialogPortal>
5055
</template>

0 commit comments

Comments
 (0)