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

Function Example

packages/@react-spectrum/s2/test/Toast.test.tsx:18–27  ·  view source on GitHub ↗
(options: ToastOptions = {})

Source from the content-addressed store, hash-verified

16import userEvent from '@testing-library/user-event';
17
18function Example(options: ToastOptions = {}) {
19 return (
20 <>
21 <ToastContainer />
22 <Button variant="primary" onPress={() => ToastQueue.neutral('Toast', options)}>
23 Show Toast
24 </Button>
25 </>
26 );
27}
28
29describe('Toast', () => {
30 installPointerEvent();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected