British Prime Minister Theresa May has said that she "will not lead the party in the next election."