STAY CALM !
Firstly remember that she is probably very frightened, and if she told you, then that should an indication of the amount of trust she has in you. If you just found out, then she is going to be even more petrified about you are going react.
The last thing she needs is to be bawled and screamed at; she needs all the emotional and pshysical help she can lay her hands. She is going to cry, she will want a cuddle; you need to provide that. In any case as you will know as a mother, when you are pregnant the hormones are “all over the place” in any case, let alone the fear element.
You would be best to give her all the information she needs about what she will be going though, including birthing, but keep it as light as possilbe; she doesn’t need to frightened about the pain element; she has enough on her plate already !
Do you know who the father of the child is; has she told you that?
If she has, does she feel confident that he will support her emotionally and financially?