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
62afe258
Commit
62afe258
authored
Jan 06, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change fields layout
parent
5d40648d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
ContractRead.tsx
ui/address/contract/ContractRead.tsx
+1
-1
ContractReadItemInput.tsx
ui/address/contract/ContractReadItemInput.tsx
+1
-0
ContractReadItemInputField.tsx
ui/address/contract/ContractReadItemInputField.tsx
+6
-4
No files found.
ui/address/contract/ContractRead.tsx
View file @
62afe258
...
...
@@ -72,7 +72,7 @@ const ContractRead = () => {
<
AccordionIcon
/>
</
AccordionButton
>
</
h2
>
<
AccordionPanel
pb=
{
4
}
>
<
AccordionPanel
pb=
{
4
}
px=
{
0
}
>
{
item
.
inputs
.
length
===
0
?
(
<
Flex
flexDir=
"column"
rowGap=
{
1
}
>
{
item
.
outputs
.
map
((
output
,
index
)
=>
<
ContractReadItemOutput
key=
{
index
}
data=
{
output
}
/>)
}
...
...
ui/address/contract/ContractReadItemInput.tsx
View file @
62afe258
...
...
@@ -82,6 +82,7 @@ const ContractReadItemInput = ({ data, address, methodId, methodName, outputs }:
rowGap=
{
2
}
alignItems=
{
{
base
:
'
flex-start
'
,
lg
:
'
center
'
}
}
onSubmit=
{
handleSubmit
(
onSubmit
)
}
flexWrap=
"wrap"
>
{
data
.
map
(({
type
,
name
},
index
)
=>
{
const
fieldName
=
getFieldName
(
name
,
index
);
...
...
ui/address/contract/ContractReadItemInputField.tsx
View file @
62afe258
...
...
@@ -24,16 +24,18 @@ const ContractReadItemInputField = ({ control, name, placeholder, setValue }: Pr
const
renderInput
=
React
.
useCallback
(({
field
}:
{
field
:
ControllerRenderProps
<
MethodInputFields
>
})
=>
{
return
(
<
FormControl
id=
{
name
}
>
<
FormControl
id=
{
name
}
maxW=
{
{
base
:
'
100%
'
,
lg
:
'
calc((100% - 24px) / 3)
'
}
}
>
<
InputGroup
size=
"xs"
>
<
Input
{
...
field
}
ref=
{
ref
}
placeholder=
{
placeholder
}
/>
<
InputRightElement
>
<
InputClearButton
onClick=
{
handleClear
}
/>
</
InputRightElement
>
{
field
.
value
&&
(
<
InputRightElement
>
<
InputClearButton
onClick=
{
handleClear
}
/>
</
InputRightElement
>
)
}
</
InputGroup
>
</
FormControl
>
);
...
...
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