button_click_observer function

Creates a shiny observer handling button clicks.