1) - Should I leave? [present] If I do, she won't dance with me.
This form is used to state facts or probable result (as here). Present tense after IF and will + verb in the main clause.
2) - Should I leave? [present] If I did or If I left, she wouldn't dance with me.
This form is used to state a hypothetical situation or a condition contrary to fact or an irrealis. That is, you are not actually leaving, therefore, she might very well dance with you. Simple past tense after if and conditional tense in the main clause.
There are many names for the grammar of these uses. (zero and second conditional for 1) and 2) respectively, for example.) But, I am not going to go into that more here because what is important is to understand how to construct these sentences and their meaning rather than laying out an academic argument.
Now, please note that: Many will say you can mix these up as you please in the following way:
3) If I did that, she won't speak to me. [will instead of wouldn't]
4) If I do that, she won't speak to me. [will]
The point is that people do use the 3) form. But the standard English form is to use a conditional tense: wouldn't speak to me. So, you can decide to sound more or less grammatical. Personally, I would not use 3). I would always say, as a native speaker:
- If I did that, she wouldn't speak to me.