Commit c5b67ac6 authored by Vignesh Mohankumar's avatar Vignesh Mohankumar Committed by GitHub

refactor: deprecate theme.none (#4362)

parent 110c6fc0
...@@ -105,7 +105,7 @@ export const ButtonLight = styled(BaseButton)<{ redesignFlag?: boolean }>` ...@@ -105,7 +105,7 @@ export const ButtonLight = styled(BaseButton)<{ redesignFlag?: boolean }>`
opacity: 0.4; opacity: 0.4;
:hover { :hover {
cursor: auto; cursor: auto;
background-color: ${({ theme, redesignFlag }) => (redesignFlag ? theme.none : theme.deprecated_primary5)}; background-color: ${({ theme, redesignFlag }) => (redesignFlag ? 'transparent' : theme.deprecated_primary5)};
box-shadow: none; box-shadow: none;
border: 1px solid transparent; border: 1px solid transparent;
outline: none; outline: none;
......
...@@ -31,7 +31,7 @@ const InputPanel = styled.div<{ hideInput?: boolean; redesignFlag: boolean }>` ...@@ -31,7 +31,7 @@ const InputPanel = styled.div<{ hideInput?: boolean; redesignFlag: boolean }>`
position: relative; position: relative;
border-radius: ${({ hideInput }) => (hideInput ? '16px' : '20px')}; border-radius: ${({ hideInput }) => (hideInput ? '16px' : '20px')};
background-color: ${({ theme, redesignFlag, hideInput }) => background-color: ${({ theme, redesignFlag, hideInput }) =>
redesignFlag ? theme.none : hideInput ? 'transparent' : theme.deprecated_bg2}; redesignFlag ? 'transparent' : hideInput ? 'transparent' : theme.deprecated_bg2};
z-index: 1; z-index: 1;
width: ${({ hideInput }) => (hideInput ? '100%' : 'initial')}; width: ${({ hideInput }) => (hideInput ? '100%' : 'initial')};
transition: height 1s ease; transition: height 1s ease;
...@@ -43,7 +43,7 @@ const FixedContainer = styled.div<{ redesignFlag: boolean }>` ...@@ -43,7 +43,7 @@ const FixedContainer = styled.div<{ redesignFlag: boolean }>`
height: 100%; height: 100%;
position: absolute; position: absolute;
border-radius: 20px; border-radius: 20px;
background-color: ${({ theme, redesignFlag }) => (redesignFlag ? theme.none : theme.deprecated_bg2)}; background-color: ${({ theme, redesignFlag }) => (redesignFlag ? 'transparent' : theme.deprecated_bg2)};
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -52,8 +52,8 @@ const FixedContainer = styled.div<{ redesignFlag: boolean }>` ...@@ -52,8 +52,8 @@ const FixedContainer = styled.div<{ redesignFlag: boolean }>`
const Container = styled.div<{ hideInput: boolean; disabled: boolean; redesignFlag: boolean }>` const Container = styled.div<{ hideInput: boolean; disabled: boolean; redesignFlag: boolean }>`
border-radius: ${({ hideInput }) => (hideInput ? '16px' : '20px')}; border-radius: ${({ hideInput }) => (hideInput ? '16px' : '20px')};
border: 1px solid ${({ theme, redesignFlag }) => (redesignFlag ? theme.none : theme.deprecated_bg0)}; border: 1px solid ${({ theme, redesignFlag }) => (redesignFlag ? 'transparent' : theme.deprecated_bg0)};
background-color: ${({ theme, redesignFlag }) => (redesignFlag ? theme.none : theme.deprecated_bg1)}; background-color: ${({ theme, redesignFlag }) => (redesignFlag ? 'transparent' : theme.deprecated_bg1)};
width: ${({ hideInput }) => (hideInput ? '100%' : 'initial')}; width: ${({ hideInput }) => (hideInput ? '100%' : 'initial')};
${({ theme, hideInput, disabled, redesignFlag }) => ${({ theme, hideInput, disabled, redesignFlag }) =>
!redesignFlag && !redesignFlag &&
......
...@@ -209,7 +209,7 @@ export default function LoadedTokenDetail({ address }: { address: string }) { ...@@ -209,7 +209,7 @@ export default function LoadedTokenDetail({ address }: { address: string }) {
<Heart <Heart
size={15} size={15}
color={isFavorited ? theme.accentAction : theme.textSecondary} color={isFavorited ? theme.accentAction : theme.textSecondary}
fill={isFavorited ? theme.accentAction : theme.none} fill={isFavorited ? theme.accentAction : 'transparent'}
/> />
</ClickFavorited> </ClickFavorited>
</TokenActions> </TokenActions>
......
...@@ -38,7 +38,7 @@ export default function FavoriteButton() { ...@@ -38,7 +38,7 @@ export default function FavoriteButton() {
return ( return (
<StyledFavoriteButton onClick={() => setShowFavorites(!showFavorites)} active={showFavorites}> <StyledFavoriteButton onClick={() => setShowFavorites(!showFavorites)} active={showFavorites}>
<FavoriteButtonContent> <FavoriteButtonContent>
<Heart size={17} color={theme.textPrimary} fill={theme.none} /> <Heart size={17} color={theme.textPrimary} fill="transparent" />
<FavoriteText>Favorites</FavoriteText> <FavoriteText>Favorites</FavoriteText>
</FavoriteButtonContent> </FavoriteButtonContent>
</StyledFavoriteButton> </StyledFavoriteButton>
......
...@@ -17,7 +17,7 @@ const SearchInput = styled.input<{ expanded: boolean }>` ...@@ -17,7 +17,7 @@ const SearchInput = styled.input<{ expanded: boolean }>`
background-image: ${({ expanded }) => !expanded && `url(${searchIcon})`}; background-image: ${({ expanded }) => !expanded && `url(${searchIcon})`};
background-size: 20px 20px; background-size: 20px 20px;
background-position: 14px center; background-position: 14px center;
background-color: ${({ theme }) => theme.none}; background-color: 'transparent';
border-radius: 12px; border-radius: 12px;
border: 1px solid ${({ theme }) => theme.backgroundOutline}; border: 1px solid ${({ theme }) => theme.backgroundOutline};
height: 100%; height: 100%;
...@@ -38,7 +38,7 @@ const SearchInput = styled.input<{ expanded: boolean }>` ...@@ -38,7 +38,7 @@ const SearchInput = styled.input<{ expanded: boolean }>`
border: none; border: none;
} }
::placeholder { ::placeholder {
color: ${({ expanded, theme }) => (expanded ? theme.textTertiary : theme.none)}; color: ${({ expanded, theme }) => (expanded ? theme.textTertiary : 'transparent')};
} }
::-webkit-search-cancel-button { ::-webkit-search-cancel-button {
-webkit-appearance: none; -webkit-appearance: none;
......
...@@ -129,7 +129,7 @@ const StyledHeaderRow = styled(StyledTokenRow)` ...@@ -129,7 +129,7 @@ const StyledHeaderRow = styled(StyledTokenRow)`
width: 100%; width: 100%;
&:hover { &:hover {
background-color: ${({ theme }) => theme.none}; background-color: 'transparent';
} }
@media only screen and (max-width: ${MAX_WIDTH_MEDIA_BREAKPOINT}) { @media only screen and (max-width: ${MAX_WIDTH_MEDIA_BREAKPOINT}) {
......
...@@ -43,7 +43,7 @@ const Row = styled.div` ...@@ -43,7 +43,7 @@ const Row = styled.div`
const CloseButton = styled.button` const CloseButton = styled.button`
cursor: pointer; cursor: pointer;
background: ${({ theme }) => theme.none}; background: 'transparent';
border: none; border: none;
color: ${({ theme }) => theme.textPrimary}; color: ${({ theme }) => theme.textPrimary};
` `
......
...@@ -12,7 +12,7 @@ const StyledInput = styled.input<{ error?: boolean; fontSize?: string; align?: s ...@@ -12,7 +12,7 @@ const StyledInput = styled.input<{ error?: boolean; fontSize?: string; align?: s
outline: none; outline: none;
border: none; border: none;
flex: 1 1 auto; flex: 1 1 auto;
background-color: ${({ theme, redesignFlag }) => (redesignFlag ? theme.none : theme.deprecated_bg1)}; background-color: ${({ theme, redesignFlag }) => (redesignFlag ? 'transparent' : theme.deprecated_bg1)};
font-size: ${({ fontSize }) => fontSize ?? '28px'}; font-size: ${({ fontSize }) => fontSize ?? '28px'};
text-align: ${({ align }) => align && align}; text-align: ${({ align }) => align && align};
white-space: nowrap; white-space: nowrap;
......
...@@ -24,7 +24,7 @@ const BaseWrapper = styled.div<{ disable?: boolean; redesignFlag?: boolean }>` ...@@ -24,7 +24,7 @@ const BaseWrapper = styled.div<{ disable?: boolean; redesignFlag?: boolean }>`
disable disable
? redesignFlag ? redesignFlag
? theme.accentAction ? theme.accentAction
: theme.none : 'transparent'
: redesignFlag : redesignFlag
? theme.backgroundOutline ? theme.backgroundOutline
: theme.deprecated_bg3}; : theme.deprecated_bg3};
......
...@@ -42,9 +42,10 @@ const StyledCard = styled(OutlineCard)<{ redesignFlag: boolean }>` ...@@ -42,9 +42,10 @@ const StyledCard = styled(OutlineCard)<{ redesignFlag: boolean }>`
const StyledHeaderRow = styled(RowBetween)<{ disabled: boolean; open: boolean; redesignFlag: boolean }>` const StyledHeaderRow = styled(RowBetween)<{ disabled: boolean; open: boolean; redesignFlag: boolean }>`
padding: ${({ redesignFlag }) => (redesignFlag ? '8px 0px 0px 0px' : '4px 8px')}; padding: ${({ redesignFlag }) => (redesignFlag ? '8px 0px 0px 0px' : '4px 8px')};
background-color: ${({ open, theme, redesignFlag }) => (open && !redesignFlag ? theme.deprecated_bg1 : theme.none)}; background-color: ${({ open, theme, redesignFlag }) =>
open && !redesignFlag ? theme.deprecated_bg1 : 'transparent'};
align-items: center; align-items: center;
border-top: 1px solid ${({ theme, redesignFlag }) => (redesignFlag ? theme.backgroundOutline : theme.none)}; border-top: 1px solid ${({ theme, redesignFlag }) => (redesignFlag ? theme.backgroundOutline : 'transparent')};
margin-top: ${({ redesignFlag }) => redesignFlag && '8px'}; margin-top: ${({ redesignFlag }) => redesignFlag && '8px'};
cursor: ${({ disabled }) => (disabled ? 'initial' : 'pointer')}; cursor: ${({ disabled }) => (disabled ? 'initial' : 'pointer')};
min-height: 40px; min-height: 40px;
......
...@@ -10,7 +10,7 @@ export const BodyWrapper = styled.main<{ margin?: string; maxWidth?: string; red ...@@ -10,7 +10,7 @@ export const BodyWrapper = styled.main<{ margin?: string; maxWidth?: string; red
width: 100%; width: 100%;
background: ${({ theme, redesignFlag }) => (redesignFlag ? theme.backgroundSurface : theme.deprecated_bg0)}; background: ${({ theme, redesignFlag }) => (redesignFlag ? theme.backgroundSurface : theme.deprecated_bg0)};
border-radius: ${({ redesignFlag }) => (redesignFlag ? '16px' : '24px')}; border-radius: ${({ redesignFlag }) => (redesignFlag ? '16px' : '24px')};
border: 1px solid ${({ theme, redesignFlag }) => (redesignFlag ? theme.backgroundOutline : theme.none)}; border: 1px solid ${({ theme, redesignFlag }) => (redesignFlag ? theme.backgroundOutline : 'transparent')};
margin-top: 1rem; margin-top: 1rem;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
......
...@@ -205,7 +205,6 @@ export interface Palette { ...@@ -205,7 +205,6 @@ export interface Palette {
white: Color white: Color
black: Color black: Color
none: Color
chain_1: Color chain_1: Color
chain_3: Color chain_3: Color
...@@ -228,8 +227,6 @@ export interface Palette { ...@@ -228,8 +227,6 @@ export interface Palette {
export const colorsLight: Palette = { export const colorsLight: Palette = {
userThemeColor: colors.magentaVibrant, userThemeColor: colors.magentaVibrant,
none: 'transparent',
backgroundBackdrop: colors.white, backgroundBackdrop: colors.white,
backgroundSurface: colors.white, backgroundSurface: colors.white,
backgroundModule: colors.gray50, backgroundModule: colors.gray50,
...@@ -321,7 +318,6 @@ export const colorsDark: Palette = { ...@@ -321,7 +318,6 @@ export const colorsDark: Palette = {
white: colors.white, white: colors.white,
black: colors.black, black: colors.black,
none: 'transparent',
chain_1: colors.networkEthereum, chain_1: colors.networkEthereum,
chain_3: colors.yellow400, chain_3: colors.yellow400,
......
...@@ -92,7 +92,6 @@ function uniswapThemeColors(darkMode: boolean): ThemeColors { ...@@ -92,7 +92,6 @@ function uniswapThemeColors(darkMode: boolean): ThemeColors {
accentTextLightSecondary: darkMode ? colorsDark.accentTextLightSecondary : colorsLight.accentTextLightSecondary, accentTextLightSecondary: darkMode ? colorsDark.accentTextLightSecondary : colorsLight.accentTextLightSecondary,
accentTextLightTertiary: darkMode ? colorsDark.accentTextLightTertiary : colorsLight.accentTextLightTertiary, accentTextLightTertiary: darkMode ? colorsDark.accentTextLightTertiary : colorsLight.accentTextLightTertiary,
none: colorsDark.none,
white: ColorsPalette.white, white: ColorsPalette.white,
black: ColorsPalette.black, black: ColorsPalette.black,
......
...@@ -37,7 +37,6 @@ export interface ThemeColors { ...@@ -37,7 +37,6 @@ export interface ThemeColors {
white: Color white: Color
black: Color black: Color
none: Color
chain_1: Color chain_1: Color
chain_3: Color chain_3: Color
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment