fix: update grow on buttons

This commit is contained in:
Madalina Raicu 2024-02-07 16:00:13 +00:00
parent 934eed87bf
commit a7d8754b64
No known key found for this signature in database
GPG Key ID: 688B7B31149C1DCD
2 changed files with 36 additions and 42 deletions

View File

@ -45,40 +45,41 @@ export const MarketsMobileSidebar = () => {
element={
<>
<ViewInitializer />
{!pubKeys || isReadOnly ? (
<>
<TradingButton
intent={Intent.Primary}
size="medium"
onClick={() => {
// onClick?.();
openVegaWalletDialog();
}}
>
{t('Connect')}
</TradingButton>
<MobileButton
view={ViewType.Order}
tooltip={t('Trade')}
routeId={currentRouteId}
/>
<MobileBarActionsDropdown currentRouteId={currentRouteId} />
</>
) : (
<>
<MobileButton
view={ViewType.Order}
tooltip={t('Trade')}
routeId={currentRouteId}
/>
<MobileButton
view={ViewType.Deposit}
tooltip={t('Deposit')}
routeId={currentRouteId}
/>
<MobileBarActionsDropdown currentRouteId={currentRouteId} />
</>
)}
<div className="grid grid-cols-3 grow md:grow-0 md:flex lg:flex-col items-center gap-2 lg:gap-4 p-1">
{!pubKeys || isReadOnly ? (
<>
<TradingButton
intent={Intent.Primary}
size="medium"
onClick={() => {
openVegaWalletDialog();
}}
>
{t('Connect')}
</TradingButton>
<MobileButton
view={ViewType.Order}
tooltip={t('Trade')}
routeId={currentRouteId}
/>
<MobileBarActionsDropdown currentRouteId={currentRouteId} />
</>
) : (
<>
<MobileButton
view={ViewType.Order}
tooltip={t('Trade')}
routeId={currentRouteId}
/>
<MobileButton
view={ViewType.Deposit}
tooltip={t('Deposit')}
routeId={currentRouteId}
/>
<MobileBarActionsDropdown currentRouteId={currentRouteId} />
</>
)}
</div>
</>
}
/>

View File

@ -71,14 +71,7 @@ export const Sidebar = ({ options }: { options?: ReactNode }) => {
return (
<div className="flex h-full lg:flex-col gap-1" data-testid="sidebar">
{options && (
<nav
className={classNames(
navClasses,
'grid grid-cols-3 grow md:grow-0 md:flex lg:flex-col pl-2'
)}
>
{options}
</nav>
<nav className={classNames(navClasses, 'flex grow')}>{options}</nav>
)}
<nav
className={classNames(