The child's body was found about a week later.
The woman cried in the dock as Judge Barry read out the details of the incident.
"You were in a fragile mental state at the time and at the time you were, due to another medical condition, subject to rapid weight fluctuations and were unaware that you were pregnant at the time.
"You have described being in a state of shock and have little memory of the events afterwards."
The woman pleaded guilty to one charge of disposing of the dead body of a child with intent to conceal its birth. She was also before the court on separate dishonesty offences.
The ex-partner, who was the father of the child, spoke in his victim impact statement of the distress the incident had caused him, and the financial pressure it put him under in the aftermath.
Judge Barry said a rehabilitative sentence was more important in this case than a punitive one.
He sentenced the woman to nine months of supervision.