theme tweaks
This commit is contained in:
@@ -3,7 +3,13 @@ import { IconButton, Tooltip } from '@mui/material'
|
||||
import { Check, ContentCopy } from '@mui/icons-material'
|
||||
import { clipboard } from '@tauri-apps/api'
|
||||
|
||||
export const CopyToClipboard = ({ text = '' }: { text?: string }) => {
|
||||
export const CopyToClipboard = ({
|
||||
text = '',
|
||||
light,
|
||||
}: {
|
||||
text?: string
|
||||
light?: boolean
|
||||
}) => {
|
||||
const [copied, setCopied] = useState(false)
|
||||
|
||||
const handleCopy = async (text: string) => {
|
||||
@@ -24,7 +30,14 @@ export const CopyToClipboard = ({ text = '' }: { text?: string }) => {
|
||||
}, [copied])
|
||||
return (
|
||||
<Tooltip title={!copied ? 'Copy' : 'Copied!'} leaveDelay={500}>
|
||||
<IconButton onClick={() => handleCopy(text)} size="small">
|
||||
<IconButton
|
||||
onClick={() => handleCopy(text)}
|
||||
size="small"
|
||||
sx={{
|
||||
color: (theme) =>
|
||||
light ? theme.palette.common.white : theme.palette.grey[600],
|
||||
}}
|
||||
>
|
||||
{!copied ? <ContentCopy fontSize="small" /> : <Check color="success" />}
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
|
||||
@@ -73,7 +73,7 @@ export const CreateAccountContent: React.FC<{ showSignIn: () => void }> = ({
|
||||
{accountDetails?.mnemonic}
|
||||
</CardContent>
|
||||
<CardActions sx={{ justifyContent: 'flex-end' }}>
|
||||
<CopyToClipboard text={accountDetails?.mnemonic || ''} />
|
||||
<CopyToClipboard text={accountDetails?.mnemonic || ''} light />
|
||||
</CardActions>
|
||||
</Card>
|
||||
<Box sx={{ textAlign: 'center' }}>
|
||||
|
||||
Vendored
-4
@@ -52,10 +52,6 @@ declare module '@mui/material/styles' {
|
||||
topNav: {
|
||||
background: string
|
||||
}
|
||||
nav: {
|
||||
background: string
|
||||
hover: string
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,10 +39,6 @@ const darkMode: NymPaletteVariant = {
|
||||
topNav: {
|
||||
background: '#111826',
|
||||
},
|
||||
nav: {
|
||||
background: '#242C3D',
|
||||
hover: '#111826',
|
||||
},
|
||||
}
|
||||
|
||||
const lightMode: NymPaletteVariant = {
|
||||
@@ -57,10 +53,6 @@ const lightMode: NymPaletteVariant = {
|
||||
topNav: {
|
||||
background: '#111826',
|
||||
},
|
||||
nav: {
|
||||
background: '#242C3D',
|
||||
hover: '#111826',
|
||||
},
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user