White House press secretary Karoline Leavitt says she will soon leave her job to spend more time with her family.