Function
SelectContent
({
className,
children,
side = "bottom",
sideOffset = 4,
align = "center",
alignOffset = 0,
alignItemWithTrigger = true,
...props
}: SelectPrimitive.Popup.Props &
Pick<
SelectPrimitive.Positioner.Props,
"align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger"
>)
Source from the content-addressed store, hash-verified
| 67 | } |
| 68 | |
| 69 | function SelectContent({ |
| 70 | className, |
| 71 | children, |
| 72 | side = "bottom", |
| 73 | sideOffset = 4, |
| 74 | align = "center", |
| 75 | alignOffset = 0, |
| 76 | alignItemWithTrigger = true, |
| 77 | ...props |
| 78 | }: SelectPrimitive.Popup.Props & |
| 79 | Pick< |
| 80 | SelectPrimitive.Positioner.Props, |
| 81 | "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger" |
| 82 | >) { |
| 83 | return ( |
| 84 | <SelectPrimitive.Portal> |
| 85 | <SelectPrimitive.Positioner |
| 86 | side={side} |
| 87 | sideOffset={sideOffset} |
| 88 | align={align} |
| 89 | alignOffset={alignOffset} |
| 90 | alignItemWithTrigger={alignItemWithTrigger} |
| 91 | className="isolate z-50" |
| 92 | > |
| 93 | <SelectPrimitive.Popup |
| 94 | data-slot="select-content" |
| 95 | className={cn( |
| 96 | "bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-none shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto", |
| 97 | className |
| 98 | )} |
| 99 | {...props} |
| 100 | > |
| 101 | <SelectScrollUpButton /> |
| 102 | <SelectPrimitive.List>{children}</SelectPrimitive.List> |
| 103 | <SelectScrollDownButton /> |
| 104 | </SelectPrimitive.Popup> |
| 105 | </SelectPrimitive.Positioner> |
| 106 | </SelectPrimitive.Portal> |
| 107 | ); |
| 108 | } |
| 109 | |
| 110 | function SelectLabel({ |
| 111 | className, |
Callers
nothing calls this directly
Tested by
no test coverage detected