react typescript passing function as props