value/checked properties and change/input/blur event
listenersvalue or checked props along with input, change, and blur events. This approach allows flexible
integration with any form library.const [value, setValue] = useState<PInputTextProps['value']>('');
const onInput = (e: CustomEvent<InputTextInputEventDetail>) => {
setValue(e.target.value);
};
...
<PInputText name="myInputText" label="Some Label" value={value} onInput={onInput} />
const onSubmit = (e: FormEvent<HTMLFormElement>) => {
console.log(e);
};
...
<form onSubmit={onSubmit}>
<PInputText name="myInputText" label="Some Label"></PInputText>
<PButton type="submit">Submit</PButton>
</form>
