import React from 'react'; import { FileUpload, DropEvent } from '@patternfly/react-core'; export const TextFileWithEditsAllowed: React.FunctionComponent = () => { const [value, setValue] = React.useState(''); const [filename, setFilename] = React.useState(''); const [isLoading, setIsLoading] = React.useState(false); const handleFileInputChange = (_, file: File) => { setFilename(file.name); }; const handleTextChange = (_event: React.ChangeEvent, value: string) => { setValue(value); }; const handleDataChange = (_event: DropEvent, value: string) => { setValue(value); }; const handleClear = (_event: React.MouseEvent) => { setFilename(''); setValue(''); }; const handleFileReadStarted = (_event: DropEvent, _fileHandle: File) => { setIsLoading(true); }; const handleFileReadFinished = (_event: DropEvent, _fileHandle: File) => { setIsLoading(false); }; return ( ); };