diff --git a/packages/curve-ui-kit/src/shared/ui/ActionInfo.tsx b/packages/curve-ui-kit/src/shared/ui/ActionInfo.tsx index 95cafa13e..4524a5ed3 100644 --- a/packages/curve-ui-kit/src/shared/ui/ActionInfo.tsx +++ b/packages/curve-ui-kit/src/shared/ui/ActionInfo.tsx @@ -1,4 +1,5 @@ import { useState } from 'react' +import { useTheme } from '@mui/material/styles' import { Stack } from '@mui/material' import Snackbar from '@mui/material/Snackbar' import Alert from '@mui/material/Alert' @@ -9,6 +10,10 @@ import Typography from '@mui/material/Typography' import Link from '@mui/material/Link' import { Duration } from '../../themes/design/0_primitives' import { shortenTokenAddress } from 'ui/src/utils/' +import { t } from 'i18next' +import { SizesAndSpaces } from '../../themes/design/1_sizes_spaces' + +const { Spacing } = SizesAndSpaces type ComponentSize = 'S' | 'M' | 'L' @@ -16,7 +21,6 @@ type ActionInfoProps = { label: string address: string linkAddress: string - copyText: string size?: ComponentSize } @@ -32,7 +36,10 @@ const addressSize: Record { +const ActionInfo = ({ label, address, linkAddress, size = 'S' }: ActionInfoProps) => { + const { + design: { Button }, + } = useTheme() const [openCopyAlert, setOpenCopyAlert] = useState(false) const copyValue = () => { @@ -45,21 +52,28 @@ const ActionInfo = ({ label, address, linkAddress, copyText, size = 'S' }: Actio {label} - - + + {shortenTokenAddress(address)} - - + + + + + - - - setOpenCopyAlert(false)} autoHideDuration={Duration.Snackbar}> - {copyText} + {t`Copied to clipboard!`} {address}