slight refactoring to the popover action to support custom Close buttons.
Added an demo action to the demo button on the example.