Commit 50912f55 authored by tom's avatar tom

fix subsequent clicks on add info button

parent 1c90ea92
import { import {
Icon, Icon,
Center,
useColorModeValue, useColorModeValue,
chakra, chakra,
Button,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
...@@ -14,13 +14,16 @@ interface Props { ...@@ -14,13 +14,16 @@ interface Props {
onClick?: () => void; onClick?: () => void;
} }
const AdditionalInfoButton = ({ isOpen, onClick, className }: Props, ref: React.ForwardedRef<HTMLDivElement>) => { const AdditionalInfoButton = ({ isOpen, onClick, className }: Props, ref: React.ForwardedRef<HTMLButtonElement>) => {
const infoBgColor = useColorModeValue('blue.50', 'gray.600'); const infoBgColor = useColorModeValue('blue.50', 'gray.600');
const infoColor = useColorModeValue('blue.600', 'blue.300'); const infoColor = useColorModeValue('blue.600', 'blue.300');
return ( return (
<Center <Button
variant="unstyled"
display="inline-flex"
alignItems="center"
className={ className } className={ className }
ref={ ref } ref={ ref }
background={ isOpen ? infoBgColor : 'unset' } background={ isOpen ? infoBgColor : 'unset' }
...@@ -36,7 +39,7 @@ const AdditionalInfoButton = ({ isOpen, onClick, className }: Props, ref: React. ...@@ -36,7 +39,7 @@ const AdditionalInfoButton = ({ isOpen, onClick, className }: Props, ref: React.
color={ infoColor } color={ infoColor }
_hover={{ color: 'blue.400' }} _hover={{ color: 'blue.400' }}
/> />
</Center> </Button>
); );
}; };
......
...@@ -150,7 +150,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress }: Props) => { ...@@ -150,7 +150,7 @@ const TxsTableItem = ({ tx, showBlockInfo, currentAddress }: Props) => {
</Td> </Td>
</Hide> </Hide>
<Td isNumeric> <Td isNumeric>
<CurrencyValue value={ tx.value }/> <CurrencyValue value={ tx.value } accuracy={ 8 }/>
</Td> </Td>
<Td isNumeric> <Td isNumeric>
<CurrencyValue value={ tx.fee.value } accuracy={ 8 }/> <CurrencyValue value={ tx.fee.value } accuracy={ 8 }/>
......
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