Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Uni Merge] Style fixes pt. 1 #380

Merged
merged 19 commits into from
Apr 14, 2022
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/components/Header/NetworkSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@ import { replaceURLParam } from 'utils/routes'

import { useAppDispatch } from '../../state/hooks'
import { switchToNetwork } from '../../utils/switchToNetwork'
import { transparentize } from 'polished'
W3stside marked this conversation as resolved.
Show resolved Hide resolved

export const ActiveRowLinkList = styled.div`
display: flex;
flex-direction: column;
padding: 0 8px;
& > a {
align-items: center;
color: ${({ theme }) => theme.text2};
color: ${({ theme }) => theme.text1};
display: flex;
flex-direction: row;
font-size: 14px;
font-weight: 500;
justify-content: space-between;
padding: 8px 0 4px;
padding: 8px 0 4px 6px;
text-decoration: none;
}
& > a:first-child {
Expand All @@ -40,14 +41,14 @@ export const ActiveRowLinkList = styled.div`
}
`
export const ActiveRowWrapper = styled.div`
background-color: ${({ theme }) => theme.bg1};
background-color: ${({ theme }) => transparentize(0.4, theme.bg4)};
border-radius: 8px;
cursor: pointer;
padding: 8px;
width: 100%;
padding: 8px;
`
export const FlyoutHeader = styled.div`
color: ${({ theme }) => theme.text2};
color: ${({ theme }) => theme.text1};
font-weight: 400;
`
const FlyoutMenu = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion src/components/Web3Status/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const Web3StatusGeneric = styled(ButtonSecondary)`
width: 100%;
align-items: center;
padding: 0.5rem;
border-radius: 14px;
border-radius: 12px;
cursor: pointer;
user-select: none;
height: 36px;
Expand Down
1 change: 0 additions & 1 deletion src/components/swap/styleds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const ArrowWrapper = styled.div<{ clickable: boolean }>`
left: calc(50% - 16px);
/* transform: rotate(90deg); */
background-color: ${({ theme }) => theme.bg1};
border: 4px solid ${({ theme }) => theme.bg0};
z-index: 2;
${({ clickable }) =>
clickable
Expand Down
2 changes: 1 addition & 1 deletion src/custom/components/Header/HeaderMod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ export const AccountElement = styled.div<{ active: boolean }>`
display: flex;
flex-direction: row;
align-items: center;
background-color: ${({ theme, active }) => (!active ? theme.bg1 : theme.bg3)};
border-radius: 12px;
background-color: ${({ theme, active }) => (!active ? theme.bg1 : theme.bg3)};
white-space: nowrap;
width: 100%;
cursor: pointer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const FlyoutMenuContents = styled.div`
flex-direction: column;
font-size: 16px;
overflow: auto;
padding: 0.3rem;
padding: 10px 12px;
//position: absolute;
//top: 54px;
min-width: 175px;
Expand Down
3 changes: 1 addition & 2 deletions src/custom/components/Identicon/IdenticonMod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function Identicon({ account: customAccount, size = 16 }: Identic
const { avatar } = useENSAvatar(account ?? undefined, false)
const [fetchable, setFetchable] = useState(true)

const icon = useMemo(() => account && jazzicon(16, parseInt(account.slice(2, 10), 16)), [account])
const icon = useMemo(() => account && jazzicon(size, parseInt(account.slice(2, 10), 16)), [size, account])
W3stside marked this conversation as resolved.
Show resolved Hide resolved
const iconRef = useRef<HTMLDivElement>(null)
useLayoutEffect(() => {
const current = iconRef.current
Expand All @@ -46,7 +46,6 @@ export default function Identicon({ account: customAccount, size = 16 }: Identic
return
}, [icon, iconRef])

console.log(`identicon`, chainAccount, customAccount, account, avatar, fetchable)
return (
<StyledIdenticon>
{avatar && fetchable ? (
Expand Down
1 change: 1 addition & 0 deletions src/custom/components/SearchModal/ManageLists/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const Wrapper = styled.div`

${ListContainer} {
${({ theme }) => theme.neumorphism.boxShadow}
padding: 1rem;
}
`

Expand Down
3 changes: 2 additions & 1 deletion src/custom/components/SwapWarnings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export const HighFeeWarning = (props: WarningProps) => {
<MouseoverTooltipContent
bgColor={theme.bg1}
color={theme.text1}
wrap
content={<HighFeeWarningMessage feePercentage={feePercentage} />}
>
<ErrorStyledInfo />
Expand Down Expand Up @@ -175,7 +176,7 @@ export const NoImpactWarning = (props: WarningProps) => {
<div>
Price impact <strong>unknown</strong> - trade carefully
</div>{' '}
<MouseoverTooltipContent bgColor={theme.bg1} color={theme.text1} content={NoImpactWarningMessage}>
<MouseoverTooltipContent bgColor={theme.bg1} color={theme.text1} content={NoImpactWarningMessage} wrap>
<ErrorStyledInfo />
</MouseoverTooltipContent>
{acceptWarningCb && (
Expand Down
3 changes: 1 addition & 2 deletions src/custom/components/Web3Status/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { AbstractConnector } from '@web3-react/abstract-connector'
import { getStatusIcon } from 'components/AccountDetails'
import useRecentActivity, { TransactionAndOrder } from 'hooks/useRecentActivity'
import { useWalletInfo } from 'hooks/useWalletInfo'
import { ButtonSecondary } from 'components/Button'
import { OrderStatus } from '@src/custom/state/orders/actions'
import { STORAGE_KEY_LAST_PROVIDER } from 'constants/index'

Expand All @@ -16,7 +15,7 @@ export const Wrapper = styled.div`
display: flex;
justify-content: center;

${ButtonSecondary} {
button {
height: 38px;
max-width: 180px;
${({ theme }) => theme.mediaWidth.upToVerySmall`
Expand Down
2 changes: 1 addition & 1 deletion src/custom/components/swap/TradeSummary/RowFee.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function RowFee({
Fees {includeGasMessage}
</ThemedText.Black>
{showHelpers && (
<MouseoverTooltipContent content={tooltip} bgColor={theme.bg1} color={theme.text1}>
<MouseoverTooltipContent content={tooltip} bgColor={theme.bg1} color={theme.text1} wrap>
<StyledInfo />
</MouseoverTooltipContent>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export function RowReceivedAfterSlippage({
content={getMinimumReceivedTooltip(allowedSlippage, isExactIn)}
bgColor={theme.bg1}
color={theme.text1}
wrap
>
<StyledInfo />
</MouseoverTooltipContent>
Expand Down
1 change: 1 addition & 0 deletions src/custom/components/swap/TradeSummary/RowSlippage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export function RowSlippage({
<MouseoverTooltipContent
bgColor={theme.bg3}
color={theme.text1}
wrap
content={
<Trans>
<p>Your slippage is MEV protected: all orders are submitted with tight spread (0.1%) on-chain.</p>
Expand Down
8 changes: 8 additions & 0 deletions src/custom/components/swap/styleds.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import styled from 'styled-components/macro'
import { ArrowWrapper as ArrowWrapperUni } from '@src/components/swap/styleds'

export * from '@src/components/swap/styleds'

export const ArrowWrapper = styled(ArrowWrapperUni)`
left: 16px;
`
20 changes: 13 additions & 7 deletions src/custom/pages/Profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default function Profile() {
<i>Total vCOW balance</i>
<b>
<span title={`${vCowBalanceMax} vCOW`}>{vCowBalance} vCOW</span>{' '}
<MouseoverTooltipContent content={tooltipText.balanceBreakdown}>
<MouseoverTooltipContent content={tooltipText.balanceBreakdown} wrap>
<HelpCircle size={14} />
</MouseoverTooltipContent>
</b>
Expand All @@ -191,7 +191,7 @@ export default function Profile() {
<BalanceDisplay titleSize={18} altColor={true}>
<i>
Vested{' '}
<MouseoverTooltipContent content={tooltipText.vested}>
<MouseoverTooltipContent content={tooltipText.vested} wrap>
<HelpCircle size={14} />
</MouseoverTooltipContent>
</i>
Expand Down Expand Up @@ -270,15 +270,15 @@ export default function Profile() {
&nbsp;&nbsp;
<Txt secondary>
Last updated
<MouseoverTooltipContent content="Data is updated on the background periodically.">
<MouseoverTooltipContent content="Data is updated on the background periodically." wrap>
<HelpCircle size={14} />
</MouseoverTooltipContent>
:&nbsp;
</Txt>
{!lastUpdated ? (
'-'
) : (
<MouseoverTooltipContent content={<TimeFormatted date={profileData?.lastUpdated} />}>
<MouseoverTooltipContent content={<TimeFormatted date={profileData?.lastUpdated} />} wrap>
<strong>{lastUpdated}</strong>
</MouseoverTooltipContent>
)}
Expand Down Expand Up @@ -317,7 +317,7 @@ export default function Profile() {
<ChildWrapper>
<ItemTitle>
Trades&nbsp;
<MouseoverTooltipContent content="Statistics regarding your own trades.">
<MouseoverTooltipContent content="Statistics regarding your own trades." wrap>
<HelpCircle size={14} />
</MouseoverTooltipContent>
</ItemTitle>
Expand All @@ -333,7 +333,10 @@ export default function Profile() {
<span>
Total trades
{isTradesTooltipVisible && (
<MouseoverTooltipContent content="You may see more trades here than what you see in the activity list. To understand why, check out the FAQ.">
<MouseoverTooltipContent
content="You may see more trades here than what you see in the activity list. To understand why, check out the FAQ."
wrap
>
<HelpCircle size={14} />
</MouseoverTooltipContent>
)}
Expand All @@ -356,7 +359,10 @@ export default function Profile() {
<ChildWrapper>
<ItemTitle>
Referrals&nbsp;
<MouseoverTooltipContent content="Statistics regarding trades by people who used your referral link.">
<MouseoverTooltipContent
content="Statistics regarding trades by people who used your referral link."
wrap
>
<HelpCircle size={14} />
</MouseoverTooltipContent>
</ItemTitle>
Expand Down
4 changes: 2 additions & 2 deletions src/custom/pages/Swap/SwapMod.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -636,12 +636,12 @@ export default function Swap({
>
<AutoRow
justify={isExpertMode || recipientToggleVisible ? 'space-between' : 'center'}
// style={{ padding: '0 1rem' }}
style={{ padding: '0 1rem' }}
>
<ArrowWrapperLoader onSwitchTokens={onSwitchTokens} setApprovalSubmitted={setApprovalSubmitted} />
{recipient === null && !showWrap && (isExpertMode || recipientToggleVisible) ? (
<LinkStyledButton id="add-recipient-button" onClick={() => onChangeRecipient('')}>
<Trans>+ Add a send (optional)</Trans>
<Trans>+ Add a recipient (optional)</Trans>
</LinkStyledButton>
) : null}
</AutoRow>
Expand Down
1 change: 1 addition & 0 deletions src/custom/pages/Swap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ export const FeesDiscount: React.FC<FeesDiscountProps> = ({ onClick, theme, ...b
content={SUBSIDY_INFO_MESSAGE + '. Click on the discount button on the right for more info.'}
bgColor={theme.bg1}
color={theme.text1}
wrap
>
<StyledInfo />
</MouseoverTooltipContent>
Expand Down