Can a newborn sleep in a pack and play?

Can a newborn sleep in a pack and play? I️ have the bassinet part but she threw up in it and I️ washed it. Come to find out my dryer broke so now I️ have 2 options. A pack and play or a swing. I️ don’t wanna do the swing because I heard somewhere it could end badly. But can a newborn sleep just on the mattress thingy in a pack and play? Do I️ need to put a sheet on it?