MCPcopy Create free account
hub / github.com/better-auth/examples / SelectContent

Function SelectContent

astro-example/src/components/ui/select.tsx:67–85  ·  view source on GitHub ↗
(
	props: PolymorphicProps<T, selectContentProps<T>>,
)

Source from the content-addressed store, hash-verified

65 };
66
67export 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
87type selectItemProps<T extends ValidComponent = "li"> = ParentProps<
88 SelectItemProps<T> & { class?: string }

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected