By a four-fifths vote of its legislative body, a local agency may donate and convey, for fairground or exposition, park, playground, or recreational purposes, to the State or to the district agricultural association of the agricultural district in which the local agency is situate any land and buildings owned, held, or used by it, upon such terms as the local agency and the district agricultural association or the State agree. If the local agency received the land or buildings by donation or dedication, the agreement is subject to the covenants, conditions, and restrictions of the donation or dedication as to the use of the land and buildings, existing at the date of transfer
from the local agency.