Welcome to HCM and thanks for posting your query here.
Whenever an injury occurs to soft tissue
it results in swelling and depending on the stress
there will be blood clot or bleeding. The swelling will start from the time of injury and peaks for 2 days. As you said the injury is to the finger nail. It will be a big hurt to a small kid. Of course dont worry. She will be alright. The black colour is due to changes in the blood clot. The clotted blood will turn from red to black to yellow and to green within a span of 10 days. It is a normal mechanism.
I suggest you to use a simple antibiotic like amoxycillin
for 5 days. Because injury to nail bed in children may some times lead to abscess
formation. In the mean time you can use some topical antiseptics like povidone iodine
Dont get worried. She will be fine. Next time take more care when the little angel is around you.
Hope this is helpful to you.