theme tweaks

This commit is contained in:
fmtabbara
2021-11-29 09:47:08 +00:00
parent 09b6d37ca6
commit a85a67199a
4 changed files with 16 additions and 15 deletions
+15 -2
View File
@@ -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' }}>
-4
View File
@@ -52,10 +52,6 @@ declare module '@mui/material/styles' {
topNav: {
background: string
}
nav: {
background: string
hover: string
}
}
/**
-8
View File
@@ -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',
},
}
/**