Before you think of discipline, you need to think of understanding.
How does your DD know that throwing the books on the floor again wasn't acceptable? If you give her a ball and she throws it, you give it back to her and she throws it again and you react with delight. Yet with a book, your response is disapproval.
At 18 months there is a lot to learn about the world. One simple rule she could understand is that there are some things that are taken away if I throw them and others that we can play a game of throwing with. Let that be enough for now. In a similar respect, there are some place I am allowed to climb and others where I get put back on the floor.
If she only looks at books on the floor, throwing them on the floor can't be a problem. If you are trying to look at books with her and she is throwing them on the floor, just put them away and find a different activity.
The day you see her picking something up and putting it away, express your delight and join in.
There are much better ways to manage behaviour than any sort of sanction. Natural consequences will be great when she's older, i.e. "We can't get the train out because there are books all over the floor. You pick them up and then you can have the train." However, she's a bit young for that just now so focus on distraction and trying to set things up so that the behaviour you find difficult matters less or is less likely to happen.