Legend React - Click Image to Close