The Messenger of Allah (ﷺ) prayed when there was an eclipse of the sun like our prayer, bowing and prostrating.
Sunan an-Nasa'i Book 16, Hadith 31