Skip to content

Commit

Permalink
change button style
Browse files Browse the repository at this point in the history
  • Loading branch information
liushooter committed Jun 2, 2020
1 parent e47f055 commit 8d91b99
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/ui/pages/Address/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ const useStyles = makeStyles({
display: 'flex',
'align-items': 'center',
},
addressText: {
"text-transform": "none"
},
});

const BootstrapButton = withStyles({
Expand Down Expand Up @@ -170,10 +173,14 @@ export default function (props: AppProps, state: AppState) {
};

const copyAddress = async () => {
setTooltipMsg("Copied")
await navigator.clipboard.writeText(address);
}

const handleClickCopyAddress = async () => {
setTooltipMsg("Copied")
copyAddress()
}

React.useEffect(() => {
(async () => {
if (open && address) {
Expand Down Expand Up @@ -225,7 +232,7 @@ export default function (props: AppProps, state: AppState) {
<Grid item xs={12}>
<Box textAlign="center" fontSize={22}>
<Tooltip title={<FormattedMessage id={tooltipMsg} />} arrow placement="bottom">
<Button onClick={copyAddress}>{truncateAddress(address)}</Button>
<Button size="large" className={classes.addressText} onClick={handleClickCopyAddress}>{truncateAddress(address)}</Button>
</Tooltip>
</Box>
<Box textAlign="center" fontSize={16}>
Expand Down

0 comments on commit 8d91b99

Please sign in to comment.