MCPcopy Create free account
hub / github.com/flyfloor/react-component / render

Method render

demo/example/NoticeDemo.jsx:33–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 }
32
33 render() {
34 return (
35 <div>
36 <ol>
37 <li>
38 <h4>Show Notice</h4>
39 <pre>
40 <code>{`<NoticeCenter ref="ncNode"/>`}</code>
41 </pre>
42 <button onClick={() => this.showNotice('normal')}>click</button>
43 <pre>
44 <code>
45{`
46this.refs.ncNode.addNotice({
47 title: title,
48 content: <p>content</p>,
49 ...
50})
51`}
52 </code>
53 </pre>
54 </li>
55 <li>
56 <h4>Notice Delay time</h4>
57 <button onClick={() => this.showNotice('delay')}>delay: 1000 ms</button>
58 <pre>
59 <code>
60{`
61this.refs.ncNode.addNotice({
62 title: title,
63 content: <p>content</p>,
64 delay: 1000,
65})
66`}
67 </code>
68 </pre>
69 </li>
70 <li>
71 <h4>Manually close</h4>
72 <button onClick={() => this.showNotice('manually')}>click</button>
73 <pre>
74 <code>
75{`
76this.refs.ncNode.addNotice({
77 title: title,
78 content: <p>content</p>,
79 delay: 0,
80 ...
81})
82`}
83 </code>
84 </pre>
85 </li>
86 <li>
87 <h4>onClick</h4>
88 <button onClick={() => this.showNotice('onClick')}>click</button>
89 <pre>
90 <code>

Callers

nothing calls this directly

Calls 1

showNoticeMethod · 0.95

Tested by

no test coverage detected