Revize c0b66eaf
Přidáno uživatelem Václav Honzík před asi 2 roky(ů)
frontend/src/features/TrackingTool/Upload/PlaintextUpload.tsx | ||
---|---|---|
1 | 1 |
import { |
2 | 2 |
Button, |
3 |
Dialog, |
|
4 | 3 |
DialogContent, |
5 | 4 |
DialogTitle, |
6 | 5 |
Stack, |
... | ... | |
15 | 14 |
import { sendTextForProcessing } from '../trackingToolThunks' |
16 | 15 |
import * as yup from 'yup' |
17 | 16 |
import { resetDialogApiCallSuccess } from '../trackingToolSlice' |
17 |
import ButtonOpenableDialog from '../../Reusables/ButtonOpenableDialog' |
|
18 |
import TextSnippetIcon from '@mui/icons-material/TextSnippet' |
|
18 | 19 |
|
19 | 20 |
const PlaintextUpload = () => { |
20 | 21 |
const loading = useSelector( |
... | ... | |
33 | 34 |
text: yup.mixed().required('Text is required'), |
34 | 35 |
}) |
35 | 36 |
|
37 |
// Form control |
|
36 | 38 |
const formik = useFormik({ |
37 | 39 |
initialValues: { |
38 | 40 |
text: '', |
... | ... | |
63 | 65 |
|
64 | 66 |
return ( |
65 | 67 |
<Fragment> |
66 |
<Button variant="contained" onClick={() => setOpen(true)}> |
|
67 |
Text |
|
68 |
</Button> |
|
69 |
<Dialog |
|
68 |
<ButtonOpenableDialog |
|
70 | 69 |
open={open} |
71 |
fullWidth={true} |
|
72 |
onClose={onCloseDialog} |
|
70 |
setOpen={setOpen} |
|
73 | 71 |
maxWidth="lg" |
72 |
buttonColor="primary" |
|
73 |
buttonVariant="contained" |
|
74 |
buttonText="Text" |
|
75 |
startIcon={<TextSnippetIcon />} |
|
76 |
onCloseCallback={onCloseDialog} |
|
74 | 77 |
> |
75 | 78 |
<DialogTitle>Plaintext Input</DialogTitle> |
76 | 79 |
<DialogContent> |
... | ... | |
110 | 113 |
</Stack> |
111 | 114 |
</form> |
112 | 115 |
</DialogContent> |
113 |
</Dialog> |
|
116 |
</ButtonOpenableDialog>
|
|
114 | 117 |
</Fragment> |
115 | 118 |
) |
116 | 119 |
} |
Také k dispozici: Unified diff
map icon colors start
re #9741