@gentleduck/registry-ui 0.2.6 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,12 +8,16 @@ import * as React from 'react'
8
8
  import { sheetVariants } from './sheet.constants'
9
9
 
10
10
  const Sheet = SheetPrimitive.Root
11
+ Sheet.displayName = 'Sheet'
11
12
 
12
13
  const SheetTrigger = SheetPrimitive.Trigger
14
+ SheetTrigger.displayName = 'SheetTrigger'
13
15
 
14
16
  const SheetClose = SheetPrimitive.Close
17
+ SheetClose.displayName = 'SheetClose'
15
18
 
16
19
  const SheetPortal = SheetPrimitive.Portal
20
+ SheetPortal.displayName = 'SheetPortal'
17
21
 
18
22
  const SheetOverlay = React.forwardRef<
19
23
  React.ComponentRef<typeof SheetPrimitive.Overlay>,
@@ -52,13 +56,21 @@ const SheetContent = React.forwardRef<
52
56
  ))
53
57
  SheetContent.displayName = SheetPrimitive.Content.displayName
54
58
 
55
- const SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
56
- <div className={cn('flex flex-col space-y-2 text-center sm:text-start', className)} {...props} />
59
+ const SheetHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
60
+ ({ className, ...props }, ref) => (
61
+ <div ref={ref} className={cn('flex flex-col space-y-2 text-center sm:text-start', className)} {...props} />
62
+ ),
57
63
  )
58
64
  SheetHeader.displayName = 'SheetHeader'
59
65
 
60
- const SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
61
- <div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />
66
+ const SheetFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
67
+ ({ className, ...props }, ref) => (
68
+ <div
69
+ ref={ref}
70
+ className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}
71
+ {...props}
72
+ />
73
+ ),
62
74
  )
63
75
  SheetFooter.displayName = 'SheetFooter'
64
76