Commit 62afe258 authored by tom's avatar tom

change fields layout

parent 5d40648d
......@@ -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 }/>) }
......
......@@ -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);
......
......@@ -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>
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment