It's a possibility that the pain medication is causing the diarrhea since it happened right after her spaying. How long is kitty to stay on the pain medication? Is kitty active, eating and drinking well? the important thing with diarrhea is to keep her well hydrated. If she's not drinking and becomes lethargic, call your vet immediately or take her to an emergency vet, as young kittens can go down fast. She should not be drinking any milk, as this often causes digestive upset. Some people have had good success with firming up stool by adding some pure canned pumpkin to the food, about 1/4 tsp. not pumpkin pie filling which has added sugar. Hope things work out for you and kitty. Let us know how it goes.
"We humans are indeed fortunate if we happen to be chosen to be owned by a cat." -- Anonymous