Skip to content

Commit ec0afb6

Browse files
SOV-4199: Fix mobile layout (#936)
* chore: fix mobile view * Create kind-candles-add.md
1 parent bb3f28c commit ec0afb6

4 files changed

Lines changed: 17 additions & 7 deletions

File tree

.changeset/kind-candles-add.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"frontend": patch
3+
"@sovryn/ui": patch
4+
---
5+
6+
SOV-4199: Fix mobile layout

apps/frontend/src/app/3_organisms/Header/Header.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,20 @@ export const Header: FC = () => {
9393
</div>
9494
}
9595
extraContent={
96-
<div className="flex space-x-4 items-center">
96+
<div className="flex lg:space-x-4 items-center flex-wrap lg:flex-nowrap flex-col-reverse lg:flex-row lg:justify-start">
9797
{isRskChain(chainId) && (
9898
<Button
9999
text={t(translations.header.nav.claimPowa)}
100100
style={ButtonStyle.primary}
101-
className="bg-[#24BFB74D]/[0.3] border-[#24BFB74D]/[0.3] hover:bg-[#24BFB74D]"
101+
className="bg-[#24BFB74D]/[0.3] border-[#24BFB74D]/[0.3] hover:bg-[#24BFB74D] mt-2 lg:mt-0 w-full lg:w-auto lg:hidden xl:block"
102102
onClick={() => navigate('/claim-POWA')}
103103
/>
104104
)}
105-
{account && <BridgeMenuItem dataAttribute="dapp-header-bridges" />}
105+
{account && (
106+
<div className="w-full lg:w-auto mt-2 lg:mt-0">
107+
<BridgeMenuItem dataAttribute="dapp-header-bridges" />
108+
</div>
109+
)}
106110
</div>
107111
}
108112
/>

apps/frontend/src/app/3_organisms/Header/components/BridgeMenuItem/BridgeMenuItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const BridgeMenuItem: FC<BridgeMenuItemProps> = ({ dataAttribute }) => {
9191
<NavDropdown
9292
text={t('header.nav.bridges.title')}
9393
className={classNames(
94-
'rounded-b-none text-gray-30 font-normal text-sm hover:bg-gray-70 hover:text-gray-10 min-w-auto w-full lg:w-auto lg:rounded bg-gray-70 border-gray-50',
94+
'text-gray-30 font-normal text-sm hover:bg-gray-70 hover:text-gray-10 min-w-auto w-full lg:w-auto rounded bg-gray-70 border-gray-50',
9595
)}
9696
closeOnClick={!isMobile}
9797
dataAttribute={dataAttribute}
@@ -117,7 +117,7 @@ export const BridgeMenuItem: FC<BridgeMenuItemProps> = ({ dataAttribute }) => {
117117
label={
118118
!isMobile && isRskChain(chainId)
119119
? t('header.nav.bridges.subMenu.btcBridgeDescription')
120-
: t('header.nav.bridges.subMenu.btcBridgeDescription_BOB')
120+
: t('header.nav.bridges.subMenu.ethBridgeDescription')
121121
}
122122
dataAttribute={`dapp-menu-btcBridge`}
123123
className={classNames('no-underline', {

packages/ui/src/2_molecules/Header/Header.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@
4343
}
4444

4545
.mobileContent {
46-
@apply mb-14 flex flex-row items-center justify-between w-full lg:hidden;
46+
@apply mb-6 flex flex-wrap flex-row items-center justify-between w-full lg:hidden;
4747
}
4848

4949
.mobileContentLogo {
5050
@apply justify-self-start;
5151
}
5252

5353
.mobileExtraContent {
54-
@apply justify-self-end;
54+
@apply justify-self-end w-full;
5555
}
5656

5757
.extraContentDesktop {

0 commit comments

Comments
 (0)