InputField is a functional component that renders an input field with a label.