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

Function Example

packages/react-aria/test/spinbutton/useSpinButton.test.js:20–27  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

18import {useSpinButton} from '../../src/spinbutton/useSpinButton';
19
20function Example(props) {
21 let {spinButtonProps} = useSpinButton(props);
22 return (
23 <div {...spinButtonProps} tabIndex={-1} data-testid="test">
24 {props.children}
25 </div>
26 );
27}
28
29describe('useSpinButton', function () {
30 it('should have role="spinbutton" and aria props', function () {

Callers

nothing calls this directly

Calls 1

useSpinButtonFunction · 0.90

Tested by

no test coverage detected