All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
That mere act is not Kufr (disbelief) even though it is an abominable and evil act. It will only be considered an act of Kufr if there is an indication that the doer wanted to despise and mock the Names of Allah and the Ahadeeth of the Prophet . The Fiqh Encyclopedia reads:
"Whoever throws a paper that contains Islamic knowledge, or the Name of Allah, or the name of a Prophet, or the name of an angel, in an impurity, or he smears that with an impurity – even if this impurity is insignificant in quantity – then he is ruled to be a Kaafir (non-Muslim) if it is proven that he wanted to despise the Sharee’ah." [End of quote]
For more benefit on leaving something on which the Name of Allah is written in a dirty place, please refer to Fataawa 263416, 319621 and 367540.
Allah Knows best.