Dear Member,
You have not disclosed in your comments above whether the unit in which you are working is covered under ESI Act, 1948 or under The Maternity Benefit Act, 1961.
I will suggest you to go through provisions of these Acts and if eligible under any of above Acts for maternity benefit, I think, the action of your employer to seek your resignation merely on the basis of claim of Maternity Benefit appears to be not in accordance with law.
Hope, in order to know your rights, you will study above Acts and ascertain your eligibility.
In you are eligible and if the employer will proceed to take any action against you, you can contact appropriate authorities as created under above Act for redressal of your grievance.