MCPcopy Create free account
hub / github.com/Lobos/react-ui / addModal

Function addModal

src/Modal.js:49–65  ·  view source on GitHub ↗
(topic, props)

Source from the content-addressed store, hash-verified

47 }
48
49 addModal (topic, props) {
50 let isReplace = false;
51 modals = modals.map((m) => {
52 if (m.id === props.id) {
53 isReplace = true;
54 m = props;
55 }
56 return m;
57 });
58 if (!isReplace) {
59 modals.push(props);
60 }
61
62 this.setState({ modals, increase: true });
63 document.body.style.height = '100%';
64 document.body.style.overflow = 'hidden';
65 }
66
67 removeModal (topic, id) {
68 let props;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…