()
| 3 | |
| 4 | export default class MessageDemo extends Component { |
| 5 | render() { |
| 6 | const content = <p>this is the message</p>; |
| 7 | return ( |
| 8 | <div> |
| 9 | <h3>Message</h3> |
| 10 | <ol> |
| 11 | <li> |
| 12 | <h4>Default message</h4> |
| 13 | <Message content={content}> |
| 14 | <button>click</button> |
| 15 | </Message> |
| 16 | <pre> |
| 17 | <code> |
| 18 | {` |
| 19 | <Message content={<p>message</p>}> |
| 20 | <button>click</button> |
| 21 | </Message> |
| 22 | `} |
| 23 | </code> |
| 24 | </pre> |
| 25 | </li> |
| 26 | <li> |
| 27 | <h4>Position</h4> |
| 28 | <ul> |
| 29 | <li> |
| 30 | <Message position='center' content={content}> |
| 31 | <button>center</button> |
| 32 | </Message> |
| 33 | <pre> |
| 34 | <code> |
| 35 | {` |
| 36 | <Message position='center' content={<p>message</p>}> |
| 37 | <button>center</button> |
| 38 | </Message> |
| 39 | `} |
| 40 | </code> |
| 41 | </pre> |
| 42 | </li> |
| 43 | <li> |
| 44 | <Message content={content} position='bottom' delay={2000}> |
| 45 | <button>bottom</button> |
| 46 | </Message> |
| 47 | <pre> |
| 48 | <code> |
| 49 | {` |
| 50 | <Message position='bottom' content={<p>message</p>} delay={2000}> |
| 51 | <button>bottom</button> |
| 52 | </Message> |
| 53 | `} |
| 54 | </code> |
| 55 | </pre> |
| 56 | </li> |
| 57 | </ul> |
| 58 | </li> |
| 59 | <li> |
| 60 | <h4>Delay time</h4> |
| 61 | <Message content={content} delay={2000}> |
| 62 | <button>delay</button> |
nothing calls this directly
no outgoing calls
no test coverage detected