Horrible if true. But as far as I understand, it would be not illegal since the president as commander-in-chief is permitted to declassify secret information. Even if it’s politically very unprofessional and stupid. But I wouldn’t be surprised at all. Drumpf has proven several times that he has no competence and is in no ways up to the job.
It may be legal, but as Brittain33 noted, it certainly is potentially impeachable. I am not saying this incident deserves impeachment, but suppose, to posit an extreme hypothetical, Trump gave to N. Korea the US nuclear codes or something? He'd be out the door in a hurry.
This is a good point. The gravity of this particular situation is troubling though it doesn't really merit impeachment (the specifics of the case must be taken into account when deciding how to proceed), but it is conceivable that a similar situation that would merit impeachment would arise.
As an aside, I wonder if a tech executive would be better with these kinds of things. That person would have trade secrets to protect, whereas a real estate mogul like Trump really has nothing of the sort.