MCPcopy Index your code
hub / github.com/adobe/react-spectrum / Component

Function Component

packages/@adobe/react-spectrum/test/utils/Slots.test.js:29–38  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

27 });
28
29 function Component(props) {
30 let internalResults = useSlotProps(props, 'slotname');
31 useEffect(() => {
32 results = internalResults;
33 }, [internalResults]);
34 let ref = useRef();
35 let {pressProps} = usePress({onPress: internalResults.onPress, ref});
36 let id = useId(internalResults.id);
37 return (
38 <button id={id} {...pressProps} ref={ref}>
39 push me
40 </button>
41 );

Callers

nothing calls this directly

Calls 3

useSlotPropsFunction · 0.90
usePressFunction · 0.90
useIdFunction · 0.90

Tested by

no test coverage detected