()
| 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 | {` |
| 46 | this.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 | {` |
| 61 | this.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 | {` |
| 76 | this.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> |
nothing calls this directly
no test coverage detected