Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
fix: make liquidity chart and input step counter responsive (#2005)
Browse files Browse the repository at this point in the history
* make chart responsive

* make input step counter text responsive

* clean up chart
  • Loading branch information
Justin Domingue authored Jul 8, 2021
1 parent f2dfc57 commit ab9c27e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/components/InputStepCounter/InputStepCounter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ const StyledInput = styled(NumericalInput)<{ usePercent?: boolean }>`
width: 100%;
font-weight: 500;
padding: 0 10px;
${({ theme }) => theme.mediaWidth.upToSmall`
font-size: 16px;
`};
${({ theme }) => theme.mediaWidth.upToExtraSmall`
font-size: 12px;
`};
`

const InputTitle = styled(TYPE.small)`
Expand Down
2 changes: 1 addition & 1 deletion src/components/LiquidityChartRangeInput/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function Chart({
innerHeight={innerHeight}
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>
<clipPath id={`${id}-chart-clip`}>
<rect x="0" y="0" width={innerWidth} height={height} />
Expand Down
1 change: 0 additions & 1 deletion src/components/LiquidityChartRangeInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { FeeAmount } from '@uniswap/v3-sdk'
import ReactGA from 'react-ga'

const ChartWrapper = styled.div`
display: grid;
position: relative;
justify-content: center;
Expand Down

0 comments on commit ab9c27e

Please sign in to comment.