configure an "on clicked" behavior for a button