MCPcopy Index your code
hub / github.com/nukeop/nuclear / SelectOptions

Function SelectOptions

packages/ui/src/components/Select/SelectOptions.tsx:7–39  ·  view source on GitHub ↗
({ children })

Source from the content-addressed store, hash-verified

5import { useSelectContext } from './context';
6
7export const SelectOptions: FC<PropsWithChildren> = ({ children }) => {
8 const {
9 open,
10 ids: { listboxId, labelId },
11 } = useSelectContext();
12 return (
13 <AnimatePresence>
14 {open && (
15 <motion.div
16 initial={{ opacity: 0, y: 4, scale: 0.98 }}
17 animate={{ opacity: 1, y: 8, scale: 1 }}
18 exit={{ opacity: 0, y: 4, scale: 0.98 }}
19 transition={{
20 type: 'spring',
21 stiffness: 260,
22 damping: 22,
23 mass: 0.9,
24 }}
25 className="absolute top-16 left-0 z-50 w-full"
26 >
27 <ListboxOptions
28 as="ul"
29 id={listboxId}
30 aria-labelledby={labelId}
31 className="border-border shadow-shadow bg-primary w-full rounded-md border-(length:--border-width) p-2 outline-none"
32 >
33 {children}
34 </ListboxOptions>
35 </motion.div>
36 )}
37 </AnimatePresence>
38 );
39};

Callers

nothing calls this directly

Calls 1

useSelectContextFunction · 0.90

Tested by

no test coverage detected