Commit 10b69e1c authored by tom's avatar tom

disabled input styles

parent 43370774
...@@ -30,6 +30,10 @@ export default function getOutlinedFieldStyles(props: StyleFunctionProps) { ...@@ -30,6 +30,10 @@ export default function getOutlinedFieldStyles(props: StyleFunctionProps) {
_hover: { _hover: {
borderColor: 'transparent', borderColor: 'transparent',
}, },
':-webkit-autofill': {
// background color for disabled input which value was selected from browser autocomplete popup
'-webkit-box-shadow': `0 0 0px 1000px ${ mode('rgba(16, 17, 18, 0.08)', 'rgba(255, 255, 255, 0.08)')(props) } inset`,
},
}, },
_invalid: { _invalid: {
borderColor: getColor(theme, errorColor), borderColor: getColor(theme, errorColor),
......
...@@ -34,7 +34,7 @@ const ContractMethodField = ({ control, name, placeholder, setValue, isDisabled ...@@ -34,7 +34,7 @@ const ContractMethodField = ({ control, name, placeholder, setValue, isDisabled
/> />
{ field.value && ( { field.value && (
<InputRightElement> <InputRightElement>
<InputClearButton onClick={ handleClear }/> <InputClearButton onClick={ handleClear } isDisabled={ isDisabled }/>
</InputRightElement> </InputRightElement>
) } ) }
</InputGroup> </InputGroup>
......
...@@ -5,13 +5,15 @@ import crossIcon from 'icons/cross.svg'; ...@@ -5,13 +5,15 @@ import crossIcon from 'icons/cross.svg';
interface Props { interface Props {
onClick: () => void; onClick: () => void;
isDisabled?: boolean;
} }
const InputClearButton = ({ onClick }: Props) => { const InputClearButton = ({ onClick, isDisabled }: Props) => {
const iconColor = useColorModeValue('blackAlpha.600', 'whiteAlpha.600'); const iconColor = useColorModeValue('blackAlpha.600', 'whiteAlpha.600');
return ( return (
<IconButton <IconButton
isDisabled={ isDisabled }
colorScheme="gray" colorScheme="gray"
aria-label="Clear input" aria-label="Clear input"
title="Clear input" title="Clear input"
......
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