First welcome to the greatest profession.
Second, you are wise to ask others for their opinions.
I have been teaching for 30 years and while you have been given a lot of advice about how to handle this situation I want to help you to develop two automatic reactions that will save you lots of time and energy as you teach in the classroom.
Say these to yourself in your car, during your commute, whenever you can practice it until they roll off your tongue.
Magical Phrase #1
Help me to understand what you meant by that comment, please.
Magical Phrase #2
Now that I understand it, many people would find that offensive and not appropriate for school because . . . would you like to restate your reaction before I respond to it with a consequence?
Using these sentences will build rapport with your students, help to understand them, and give them an option to show remorse, apologize, and rethink the situation before having to document, go up the chain of command, call home, etc.
Try them – they work for me and may work for you.