You handled it GREAT.
WE WANT our kids to cry/be upset from time to time... it's part of how they learn and learn *empathy*. Kids who have *never* been made to feel badly about hurting other people/ children have a name: bullies or spoiled rotten. They think it's fun/ funny to hurt others. You really, REALLY, want your baby/toddler to link feeling badly with inappropriate actions. Which she'll never do if she's never made to feel badly about anything.
There's a big difference between a baby/toddler hurting someone on accident because they don't know any better, and *intentionally* hurting someone. Pulling on hair v yanking hair, knocking someone down on accident v knocking them down out of anger. She bit you, not to *try* to hurt you (that will come later), but to "see what happens". She saw what happens. She may do it 1 or 2 more times just to 'double check', but that will be the end of it since she's older now (unless you send mixed signals).
That doesn't mean that our kids crying is easy on US... the whole "this is going to hurt me more than it hurts you" phrase really makes sense, now, doesn't it? It's not just 'dad with a belt' kind of thing... it's timeouts, and canceling playdates, and taking away a toy that's beloved but being abused (you do NOT hit your brother with the truck), and all the times we see our kids struggling and have to be firm on discipline even when WE don't want to.