Theresa May pledges UK commitment after Brexit