Commit 1944fe40 authored by Kaylee George's avatar Kaylee George Committed by GitHub

fix: width of widget and network balances on token details (#4392)

* fix width

* nits

* width var

* nit

* px fix
Co-authored-by: default avatarVignesh Mohankumar <me@vig.xyz>
parent 99217361
...@@ -9,15 +9,14 @@ import styled, { useTheme } from 'styled-components/macro' ...@@ -9,15 +9,14 @@ import styled, { useTheme } from 'styled-components/macro'
import NetworkBalance from './NetworkBalance' import NetworkBalance from './NetworkBalance'
const BalancesCard = styled.div` const BalancesCard = styled.div`
width: 284px; width: 100%;
height: fit-content; height: fit-content;
color: ${({ theme }) => theme.textPrimary}; color: ${({ theme }) => theme.textPrimary};
font-size: 12px; font-size: 12px;
line-height: 20px; line-height: 16px;
padding: 20px; padding: 20px;
background-color: ${({ theme }) => theme.backgroundSurface}; background-color: ${({ theme }) => theme.backgroundSurface};
border-radius: 12px; border-radius: 16px;
border: 1px solid ${({ theme }) => theme.backgroundOutline};
` `
const ErrorState = styled.div` const ErrorState = styled.div`
display: flex; display: flex;
......
...@@ -26,6 +26,7 @@ import styled from 'styled-components/macro' ...@@ -26,6 +26,7 @@ import styled from 'styled-components/macro'
import { DARK_THEME, LIGHT_THEME } from 'theme/token-details-widget-theme' import { DARK_THEME, LIGHT_THEME } from 'theme/token-details-widget-theme'
import { ROUTER_URL, RPC_URL_MAP } from 'utils/token-details-widget-config' import { ROUTER_URL, RPC_URL_MAP } from 'utils/token-details-widget-config'
const WIDGET_WIDTH = 320
const Footer = styled.div` const Footer = styled.div`
display: none; display: none;
@media only screen and (max-width: ${LARGE_MEDIA_BREAKPOINT}) { @media only screen and (max-width: ${LARGE_MEDIA_BREAKPOINT}) {
...@@ -53,6 +54,7 @@ const RightPanel = styled.div` ...@@ -53,6 +54,7 @@ const RightPanel = styled.div`
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 20px; gap: 20px;
width: ${WIDGET_WIDTH}px;
@media only screen and (max-width: ${LARGE_MEDIA_BREAKPOINT}) { @media only screen and (max-width: ${LARGE_MEDIA_BREAKPOINT}) {
display: none; display: none;
...@@ -149,7 +151,7 @@ export default function TokenDetails() { ...@@ -149,7 +151,7 @@ export default function TokenDetails() {
routerUrl={ROUTER_URL} routerUrl={ROUTER_URL}
theme={widgetTheme} theme={widgetTheme}
// tokenList={[]} // tokenList={[]}
width={290} width={WIDGET_WIDTH}
/> />
{tokenWarning && <TokenSafetyMessage tokenAddress={tokenAddress} warning={tokenWarning} />} {tokenWarning && <TokenSafetyMessage tokenAddress={tokenAddress} warning={tokenWarning} />}
{!loading && ( {!loading && (
......
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