I took care of a newborn while working from home. It's quite doable. It helps to have long arms, but you can keep the infant in one of those baby slings while you tap away. They get all the attention they could need, especially if like me you tend to talk to yourself. With a baby you no longer seem like a crazy person.
When they get a bit older, you can put them in a Bumbo and have them on your desk, if you can do it safely.
It's harder to work from home when they get mobile to be honest.