MCPcopy Create free account
hub / github.com/react-component/tooltip / App

Function App

tests/index.test.tsx:222–234  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

220
221 it('visible', () => {
222 const App = () => {
223 const [open, setOpen] = React.useState(false);
224 return (
225 <Tooltip overlay={<strong className="x-content">Tooltip content</strong>} visible={open}>
226 <div
227 className="target"
228 onClick={() => {
229 setOpen(true);
230 }}
231 />
232 </Tooltip>
233 );
234 };
235 const { container } = render(<App />);
236
237 expect(container.querySelector('.x-content')).toBeFalsy();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected