Chemically deposited magnesium hydroxide thin film