Make component generator work with various prop types