You should resign in the normal way, giving the notice period stated in your contract or agreed with your employer. If you resign during your maternity leave, you do not have to go into work during your notice period, you can remain on maternity leave.