Skip to content

Commit 52031fb

Browse files
committed
ui: fix menu icon overlap when sidebar is collapsed
1 parent 02057ba commit 52031fb

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

app/src/components/loop/processing/ProcessingSwaps.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ import { styled } from 'components/theme';
1010
import ProcessingSwapRow from './ProcessingSwapRow';
1111

1212
const Styled = {
13-
Wrapper: styled.section`
13+
Wrapper: styled.section<{ sidebar?: boolean }>`
1414
display: flex;
1515
flex-direction: column;
1616
min-height: 360px;
1717
padding: 40px;
1818
background-color: ${props => props.theme.colors.darkBlue};
1919
border-radius: 35px;
2020
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.5);
21+
margin-left: ${props => (props.sidebar ? '0' : '40px')};
2122
`,
2223
Header: styled.div`
2324
display: flex;
@@ -41,11 +42,11 @@ const Styled = {
4142

4243
const ProcessingSwaps: React.FC = () => {
4344
const { l } = usePrefixedTranslation('cmps.loop.processing.ProcessingSwaps');
44-
const { swapStore, uiStore } = useStore();
45+
const { swapStore, uiStore, settingsStore } = useStore();
4546

4647
const { Wrapper, Header, Content, Complete, ConfirmAnimation } = Styled;
4748
return (
48-
<Wrapper>
49+
<Wrapper sidebar={settingsStore.sidebarVisible}>
4950
<Header>
5051
<HeaderFour>{l('title')}</HeaderFour>
5152
<Tip overlay={l('minimizeTip')}>

app/src/components/loop/swap/SwapWizard.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ import SwapProcessingStep from './SwapProcessing';
1111
import SwapReviewStep from './SwapReviewStep';
1212

1313
const Styled = {
14-
Wrapper: styled.section`
14+
Wrapper: styled.section<{ sidebar?: boolean }>`
1515
display: flex;
1616
min-height: 360px;
1717
padding: 30px;
1818
background-color: ${props => props.theme.colors.darkBlue};
1919
border-radius: 35px;
2020
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.5);
21+
margin-left: ${props => (props.sidebar ? '0' : '40px')};
2122
`,
2223
Nav: styled.div`
2324
width: 36px;
@@ -33,7 +34,7 @@ const Styled = {
3334
const SwapWizard: React.FC = () => {
3435
const { l } = usePrefixedTranslation('cmps.loop.swap.SwapWizard');
3536

36-
const { buildSwapStore } = useStore();
37+
const { buildSwapStore, settingsStore } = useStore();
3738

3839
let cmp: ReactNode;
3940
switch (buildSwapStore.currentStep) {
@@ -52,7 +53,7 @@ const SwapWizard: React.FC = () => {
5253

5354
const { Wrapper, Nav, Content } = Styled;
5455
return (
55-
<Wrapper>
56+
<Wrapper sidebar={settingsStore.sidebarVisible}>
5657
<Nav>
5758
<Tip overlay={l('backTip')}>
5859
<ArrowLeft onClick={buildSwapStore.goToPrevStep} />

0 commit comments

Comments
 (0)