Commit ab9c27ed authored by Justin Domingue's avatar Justin Domingue Committed by GitHub

fix: make liquidity chart and input step counter responsive (#2005)

* make chart responsive

* make input step counter text responsive

* clean up chart
parent f2dfc570
...@@ -46,6 +46,14 @@ const StyledInput = styled(NumericalInput)<{ usePercent?: boolean }>` ...@@ -46,6 +46,14 @@ const StyledInput = styled(NumericalInput)<{ usePercent?: boolean }>`
width: 100%; width: 100%;
font-weight: 500; font-weight: 500;
padding: 0 10px; padding: 0 10px;
${({ theme }) => theme.mediaWidth.upToSmall`
font-size: 16px;
`};
${({ theme }) => theme.mediaWidth.upToExtraSmall`
font-size: 12px;
`};
` `
const InputTitle = styled(TYPE.small)` const InputTitle = styled(TYPE.small)`
......
...@@ -68,7 +68,7 @@ export function Chart({ ...@@ -68,7 +68,7 @@ export function Chart({
innerHeight={innerHeight} innerHeight={innerHeight}
showClear={Boolean(zoom && zoom.k !== 1)} showClear={Boolean(zoom && zoom.k !== 1)}
/> />
<svg ref={svgRef} style={{ overflow: 'visible' }} width={width} height={height}> <svg ref={svgRef} width="100%" height="100%" viewBox={`0 0 ${width} ${height}`} style={{ overflow: 'visible' }}>
<defs> <defs>
<clipPath id={`${id}-chart-clip`}> <clipPath id={`${id}-chart-clip`}>
<rect x="0" y="0" width={innerWidth} height={height} /> <rect x="0" y="0" width={innerWidth} height={height} />
......
...@@ -18,7 +18,6 @@ import { FeeAmount } from '@uniswap/v3-sdk' ...@@ -18,7 +18,6 @@ import { FeeAmount } from '@uniswap/v3-sdk'
import ReactGA from 'react-ga' import ReactGA from 'react-ga'
const ChartWrapper = styled.div` const ChartWrapper = styled.div`
display: grid;
position: relative; position: relative;
justify-content: center; justify-content: center;
......
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