Very nice example and explanations! You even show how to pass in multiple values to test with. Thank you!
Please make the hitbox around your close icons larger than 1 pixel..
And please do not make the X itself the only clickable part!
It’s like some
developers programmers never actually use the user interface that they design..