| 65 | }; |
| 66 | |
| 67 | export const SelectContent = <T extends ValidComponent = "div">( |
| 68 | props: PolymorphicProps<T, selectContentProps<T>>, |
| 69 | ) => { |
| 70 | const [local, rest] = splitProps(props as selectContentProps, ["class"]); |
| 71 | |
| 72 | return ( |
| 73 | <SelectPrimitive.Portal> |
| 74 | <SelectPrimitive.Content |
| 75 | class={cn( |
| 76 | "relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[expanded]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[expanded]:fade-in-0 data-[closed]:zoom-out-95 data-[expanded]:zoom-in-95", |
| 77 | local.class, |
| 78 | )} |
| 79 | {...rest} |
| 80 | > |
| 81 | <SelectPrimitive.Listbox class="p-1 focus-visible:outline-none" /> |
| 82 | </SelectPrimitive.Content> |
| 83 | </SelectPrimitive.Portal> |
| 84 | ); |
| 85 | }; |
| 86 | |
| 87 | type selectItemProps<T extends ValidComponent = "li"> = ParentProps< |
| 88 | SelectItemProps<T> & { class?: string } |