MCPcopy Create free account
hub / github.com/adobe/react-spectrum / TestComponent

Function TestComponent

packages/react-aria-components/test/Button.test.js:241–248  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239 it('displays a spinner when isPending prop is true', async function () {
240 let onPressSpy = jest.fn();
241 function TestComponent() {
242 let [pending, setPending] = useState(false);
243 return (
244 <Button
245 onPress={() => {
246 setPending(true);
247 onPressSpy();
248 }}
249 isPending={pending}>
250 {({isPending}) => (
251 <>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected