Debian Codegraph @

node/@patternfly/react-core/src/components/TextInput/examples/TextInputInvalid.tsx

raw
1 import { useState } from 'react';
2 import { TextInput, ValidatedOptions } from '@patternfly/react-core';
3
4 export const TextInputInvalid: React.FunctionComponent = () => {
5 const [value, setValue] = useState('');
6 return (
7 <TextInput
8 value={value}
9 onChange={(_event, value) => setValue(value)}
10 isRequired
11 validated={ValidatedOptions.error}
12 type="text"
13 aria-label="invalid text input example"
14 />
15 );
16 };