()
| 19 | } |
| 20 | |
| 21 | const App = () => { |
| 22 | const [color, setColor] = useState('skyblue') |
| 23 | |
| 24 | return ( |
| 25 | <div |
| 26 | style={{ |
| 27 | padding: '20px', |
| 28 | }} |
| 29 | > |
| 30 | <Card color={color}> |
| 31 | <input |
| 32 | type={'button'} |
| 33 | value={'Randomize Color'} |
| 34 | onClick={() => setColor(randomColor())} |
| 35 | /> |
| 36 | </Card> |
| 37 | </div> |
| 38 | ) |
| 39 | } |
| 40 | |
| 41 | render(<App />, document.querySelector('#app')) |
nothing calls this directly
no test coverage detected