1 00:00:01,260 --> 00:00:06,900 Well, this would be a very quick and easy solution, all we really need to do is add in an unclick 2 00:00:06,900 --> 00:00:08,880 event handler to the icon element. 3 00:00:09,190 --> 00:00:13,530 Whenever user clicks on it, we need to call the props dot on Dismas function. 4 00:00:14,400 --> 00:00:18,690 So on the icon element, I'll first begin by giving myself just a little bit of space here. 5 00:00:21,990 --> 00:00:28,200 Well, then add in my unclick up and inside there, remember, we can either put in an arrow function 6 00:00:28,200 --> 00:00:36,780 and call Rob Scott on dismiss manually like so, or we can just pass a direct reference to Prop Scott 7 00:00:36,780 --> 00:00:37,790 on Dismas instead. 8 00:00:38,040 --> 00:00:41,460 And so if you want to do that little shortcut, we would take out the entire function. 9 00:00:42,360 --> 00:00:48,000 And place in there only from start on Dismas without any parentheses after it. 10 00:00:48,930 --> 00:00:54,060 So now if I open the Motal, I should be able to click on the X Internet if the model closes. 11 00:00:55,010 --> 00:00:55,610 Looks good. 12 00:00:56,500 --> 00:00:58,980 I'm going to check my solution and let's see how we are doing. 13 00:01:03,090 --> 00:01:03,690 There we go. 14 00:01:04,320 --> 00:01:04,650 All right. 15 00:01:04,690 --> 00:01:05,340 That looks good. 16 00:01:05,370 --> 00:01:08,610 Let's take a pause here and continue with our application in the next video.