Skip to content

Commit

Permalink
Improve dark mode color styles. (gnosis/cowswap#1401)
Browse files Browse the repository at this point in the history
* Improve dark mode color styles.

* Improve dark mode color styles.

* Improve dark mode color styles.

* Improve dark mode color styles.
  • Loading branch information
fairlighteth authored and W3stside committed Sep 22, 2021
1 parent 6cd492a commit ea4f68a
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 20 deletions.
6 changes: 5 additions & 1 deletion src/custom/components/Popups/PopupItem.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import styled from 'styled-components'
import { PopupContent } from 'state/application/actions'
import { default as PopupItemUni, Fader } from './PopupItemMod'
import { default as PopupItemUni, Fader, StyledClose } from './PopupItemMod'

export const Wrapper = styled(PopupItemUni)`
${(props) => props.className} {
Expand All @@ -13,6 +13,10 @@ export const Wrapper = styled(PopupItemUni)`
height: 4px;
}
${StyledClose} {
stroke: ${({ theme }) => theme.text1};
}
a {
text-decoration: underline;
color: ${({ theme }) => theme.textLink};
Expand Down
32 changes: 24 additions & 8 deletions src/custom/components/SearchModal/CurrencySearch/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,44 @@ export const ContentWrapper = styled(Column)`
position: relative;
${SearchInput} {
border: 1px solid ${({ theme }) => transparentize(0.7, theme.text1)}};
}
${SearchInput}:focus {
border-color: ${({ theme }) => theme.primary1}};
border: none;
transition: background 0.3s ease-in-out;
${({ theme }) => theme.neumorphism.boxShadow}
}
${SearchInput}::placeholder {
font-size: 16px;
color: ${({ theme }) => transparentize(0.5, theme.text1)};
}
${SearchInput}:focus::placeholder {
color: ${({ theme }) => transparentize(0.7, theme.text1)};
}
${Separator} {
background: ${({ theme }) => transparentize(0.7, theme.text1)};
background: none;
// Target the token list container
+ div {
${({ theme }) => theme.neumorphism.boxShadow}
}
}
`

const FooterButtonTextComponent = ({ theme }: { theme: DefaultTheme }) => (
<RowFixed>
<IconWrapper size="16px" marginRight="6px" stroke={theme.blue1}>
<IconWrapper
size="16px"
marginRight="6px"
// stroke={theme.blue1}
stroke={theme.text1}
>
<Edit />
</IconWrapper>
<TYPE.main color={theme.blue1}>
<TYPE.main
// color={theme.blue1}
color={theme.text1}
>
<Trans>Manage Token Lists</Trans>
</TYPE.main>
</RowFixed>
Expand Down
15 changes: 9 additions & 6 deletions src/custom/components/SearchModal/Manage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,22 @@ export const Wrapper = styled.div`
padding-bottom: 80px;
${SearchInput} {
border: 1px solid ${({ theme }) => transparentize(0.7, theme.text1)}};
}
${SearchInput}:focus {
border-color: ${({ theme }) => theme.primary1}};
border: none;
transition: background 0.3s ease-in-out;
${({ theme }) => theme.neumorphism.boxShadow}
}
${SearchInput}::placeholder {
font-size: 16px;
color: ${({ theme }) => transparentize(0.5, theme.text1)};
}
${SearchInput}:focus::placeholder {
color: ${({ theme }) => transparentize(0.7, theme.text1)};
}
${Separator} {
background: ${({ theme }) => transparentize(0.7, theme.text1)};
background: none;
}
`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ ListRowProps & { listUrl: string }) {
)
})

const ListContainer = styled.div`
export const ListContainer = styled.div`
padding: 1rem;
height: 100%;
overflow: auto;
Expand Down
17 changes: 15 additions & 2 deletions src/custom/components/SearchModal/ManageLists/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { ManageLists as ManageListsMod } from './ManageListsMod'
import { ManageLists as ManageListsMod, ListContainer } from './ManageListsMod'
import { DEFAULT_NETWORK_FOR_LISTS, UNSUPPORTED_LIST_URLS } from 'constants/lists'
import { useActiveWeb3React } from 'hooks/web3'
import { CurrencyModalView } from '@src/components/SearchModal/CurrencySearchModal'
Expand All @@ -18,6 +18,15 @@ export interface ListRowProps {
enableList: (url: string) => ReturnType<typeof enableList>
}

const Wrapper = styled.div`
width: 100%;
height: 100%;
${ListContainer} {
${({ theme }) => theme.neumorphism.boxShadow}
}
`

export const RowWrapper = styled(Row)<{ bgColor: string; active: boolean }>`
background-color: ${({ bgColor, active, theme }) => (active ? bgColor ?? 'transparent' : theme.bg4)};
transition: 0.2s;
Expand Down Expand Up @@ -71,5 +80,9 @@ export const ManageLists = (props: {
disableList: (url: string) => disableList({ url, chainId }),
enableList: (url: string) => enableList({ url, chainId }),
}
return <ManageListsMod {...props} unsupportedListUrls={UNSUPPORTED_LIST_URLS[chainId]} listRowProps={listRowProps} />
return (
<Wrapper>
<ManageListsMod {...props} unsupportedListUrls={UNSUPPORTED_LIST_URLS[chainId]} listRowProps={listRowProps} />
</Wrapper>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Wrapper = styled.div`
padding-bottom: 80px;
`

const Footer = styled.div`
export const Footer = styled.div`
position: absolute;
bottom: 0;
width: 100%;
Expand Down
23 changes: 22 additions & 1 deletion src/custom/components/SearchModal/ManageTokens/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import { Token } from '@uniswap/sdk-core'
import styled, { DefaultTheme } from 'styled-components/macro'
import Card from 'components/Card'
import ImportRow from 'components/SearchModal/ImportRow'
import ManageTokensMod, { ManageTokensProps } from './ManageTokensMod'
import ManageTokensMod, { ManageTokensProps, Footer } from './ManageTokensMod'
import { CurrencyModalView } from 'components/SearchModal/CurrencySearchModal'
import { Separator } from 'components/SearchModal/styleds'
import Column from 'components/Column'
import Row, { RowFixed, RowBetween } from 'components/Row'
import { ButtonText, LinkIcon } from 'theme'

Expand All @@ -18,6 +20,10 @@ export const Wrapper = styled.div`
height: 100%;
position: relative;
> div {
padding: 0 0 40px;
}
${Row} > div {
margin: 0;
}
Expand Down Expand Up @@ -54,6 +60,21 @@ export const Wrapper = styled.div`
${ButtonText} > div {
color: ${({ theme }) => theme.primary1};
}
${Column} > ${Separator} + div {
height: 100%;
grid-auto-rows: min-content;
${({ theme }) => theme.neumorphism.boxShadow}
}
${Footer} {
display: flex;
justify-content: center;
align-items: center;
font-size: 13px;
padding: 0;
height: 50px;
}
`

const ImportTokensRow = ({ theme, searchToken, setModalView, setImportToken }: ImportTokensRowProps) => (
Expand Down

0 comments on commit ea4f68a

Please sign in to comment.