For example I have a component that takes in these props through an interface:
interface InputProps {
error?: boolean;
errorText?: string;
}
const Input = ({error, errorText}: InputProps) => { etc etc }
How do I make it so that if this component is called in another part of the code i.e.
<Input />
"error" has to be passed as a prop if "errorText" has been passed.
Not sure where to start