Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
f8185501
Commit
f8185501
authored
Feb 06, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable d'n'd
parent
324f675c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
ContractVerificationFieldSources.tsx
...tVerification/fields/ContractVerificationFieldSources.tsx
+5
-4
No files found.
ui/contractVerification/fields/ContractVerificationFieldSources.tsx
View file @
f8185501
...
@@ -6,7 +6,7 @@ import { Controller, useFormContext } from 'react-hook-form';
...
@@ -6,7 +6,7 @@ import { Controller, useFormContext } from 'react-hook-form';
import
type
{
FormFields
}
from
'
../types
'
;
import
type
{
FormFields
}
from
'
../types
'
;
import
{
Mb
}
from
'
lib/consts
'
;
import
{
Mb
}
from
'
lib/consts
'
;
import
DragAndDropArea
from
'
ui/shared/forms/DragAndDropArea
'
;
//
import DragAndDropArea from 'ui/shared/forms/DragAndDropArea';
import
FieldError
from
'
ui/shared/forms/FieldError
'
;
import
FieldError
from
'
ui/shared/forms/FieldError
'
;
import
FileInput
from
'
ui/shared/forms/FileInput
'
;
import
FileInput
from
'
ui/shared/forms/FileInput
'
;
import
FileSnippet
from
'
ui/shared/forms/FileSnippet
'
;
import
FileSnippet
from
'
ui/shared/forms/FileSnippet
'
;
...
@@ -66,7 +66,7 @@ const ContractVerificationFieldSources = ({ fileTypes, multiple, title, classNam
...
@@ -66,7 +66,7 @@ const ContractVerificationFieldSources = ({ fileTypes, multiple, title, classNam
const
renderControl
=
React
.
useCallback
(({
field
}:
{
field
:
ControllerRenderProps
<
FormFields
,
'
sources
'
>
})
=>
(
const
renderControl
=
React
.
useCallback
(({
field
}:
{
field
:
ControllerRenderProps
<
FormFields
,
'
sources
'
>
})
=>
(
<>
<>
<
FileInput
<
FormFields
,
'
sources
'
>
accept=
{
fileTypes
.
join
(
'
,
'
)
}
multiple=
{
multiple
}
field=
{
field
}
>
<
FileInput
<
FormFields
,
'
sources
'
>
accept=
{
fileTypes
.
join
(
'
,
'
)
}
multiple=
{
multiple
}
field=
{
field
}
>
{
(
{
onChange
}
)
=>
(
{
()
=>
(
<
Flex
<
Flex
flexDir=
"column"
flexDir=
"column"
alignItems=
"flex-start"
alignItems=
"flex-start"
...
@@ -78,11 +78,12 @@ const ContractVerificationFieldSources = ({ fileTypes, multiple, title, classNam
...
@@ -78,11 +78,12 @@ const ContractVerificationFieldSources = ({ fileTypes, multiple, title, classNam
<
Button
<
Button
variant=
"outline"
variant=
"outline"
size=
"sm"
size=
"sm"
mb=
{
2
}
//
mb=
{
2
}
>
>
Upload file
{
multiple
?
'
s
'
:
''
}
Upload file
{
multiple
?
'
s
'
:
''
}
</
Button
>
</
Button
>
<
DragAndDropArea
onDrop=
{
onChange
}
/>
{
/* design is not ready */
}
{
/* <DragAndDropArea onDrop={ onChange }/> */
}
</
Flex
>
</
Flex
>
)
}
)
}
</
FileInput
>
</
FileInput
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment