To hang them we just drilled straight through the back of the ledge and right into the stud. My original plan was to have the top shelf a little deeper than the bottom two but when buying the materials I changed my mind to have them all the same depth and I'm so glad I did.
We decided to reinforce the bottom ledge since it would be the most likely to get grabbed when baby girl gets older and decides she wants to practice climbing. That shelf is secured from the back and also the bottom straight into the stud so it is as sturdy as can be.
I'm still playing around with the top shelf's arrangement so just ignore my lackluster attempt at styling. And here's a little reference point for ya: the door from our room is on the left and her closet is on the right. I still have to take final pictures of that space before I can show you her very own walk-in closet. Lucky girl.