Skip to content

Commit

Permalink
fix: use sheet close button (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
gularsson authored Dec 22, 2023
1 parent 04e9cf9 commit 29619ea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/ui/sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import * as React from 'react'
import * as SheetPrimitive from '@radix-ui/react-dialog'
import { Button } from './button'
import { cva, type VariantProps } from 'class-variance-authority'
import { X } from 'lucide-react'

Expand Down Expand Up @@ -65,8 +66,10 @@ SheetContentProps
{...props}
>
{children}
<SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
<X className="h-4 w-4" />
<SheetPrimitive.Close className="absolute right-2 top-2 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
<Button variant='ghost' className='w-9 px-0'>
<X />
</Button>
<span className="sr-only">Close</span>
</SheetPrimitive.Close>
</SheetPrimitive.Content>
Expand Down

0 comments on commit 29619ea

Please sign in to comment.