Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Fix token display in dark/light mode for transactions. (#2386)
Browse files Browse the repository at this point in the history
  • Loading branch information
fairlighteth authored Feb 4, 2022
1 parent c939d78 commit 94245c5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/custom/components/AccountDetails/Transaction/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,13 +481,14 @@ export const ActivityVisual = styled.div`
padding: 2px;
box-sizing: content-box;
box-shadow: none;
background: ${({ theme }) => theme.card.background2};
background: ${({ theme }) => theme.transaction.tokenBackground};
color: ${({ theme }) =>
theme.text1}!important; // Todo: Re-factor StyledLogo to prevent inline style and needing to use !important here
theme.transaction.tokenColor}!important; // TODO: Fix MOD file to not require this !important property value.
border: 2px solid ${({ theme }) => theme.transaction.tokenBorder};
}
${StyledLogo}:not(:first-child):last-child {
margin: 0 0 0 -8px;
margin: 0 0 0 -9px;
}
&:hover ${StyledLogo} {
Expand Down
5 changes: 5 additions & 0 deletions src/custom/theme/baseTheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ export function themeVariables(darkMode: boolean, colorsTheme: Colors) {
content: '680px',
},
},
transaction: {
tokenBackground: colorsTheme.bg2,
tokenColor: '#1d4373',
tokenBorder: darkMode ? '#01182a' : colorsTheme.bg3,
},
neumorphism: {
boxShadow: css`
box-shadow: inset 2px -2px 4px ${darkMode ? '#1d4373' : '#ffffff'},
Expand Down
5 changes: 5 additions & 0 deletions src/custom/theme/styled.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ declare module 'styled-components' {
content: string
}
}
transaction: {
tokenBackground: string
tokenColor: string
tokenBorder: string
}
neumorphism: {
boxShadow: FlattenSimpleInterpolation
}
Expand Down

0 comments on commit 94245c5

Please sign in to comment.