Skip to content

Commit

Permalink
fix: design top line of side menu should be alligned with top line of…
Browse files Browse the repository at this point in the history
… page header (#950)

* fix: design top line of side menu should be alligned with top line of page header
https://bigc-b2b.atlassian.net/browse/BUN-2063
  • Loading branch information
BrianJiang2021 authored and libruce committed Mar 5, 2024
1 parent e64ef56 commit 1ed88ce
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 20 deletions.
8 changes: 3 additions & 5 deletions apps/storefront/src/components/layout/B3Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,9 @@ export default function B3Layout({ children }: { children: ReactNode }) {
<CompanyCredit />
<Box
component="main"
sx={
{
// flexGrow: 1,
}
}
sx={{
mt: !isMobile && !title ? '24px' : '0',
}}
>
{children}
</Box>
Expand Down
34 changes: 23 additions & 11 deletions apps/storefront/src/components/layout/B3Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,29 @@ export default function B3Logo() {

return (
<Box
sx={{
flexShrink: '0',
height: 'auto',
width: `${isMobile ? '45%' : '100%'}`,
'& img': {
width: '100%',
height: '100%',
objectFit: 'contain',
},
display: 'contents',
}}
sx={
isMobile
? {
flexShrink: '0',
height: 'auto',
width: '45%',
display: 'contents',
'& img': {
width: '100%',
height: '100%',
objectFit: 'contain',
},
}
: {
width: '100%',
height: '64px',
'& img': {
width: '100%',
maxHeight: '64px',
objectFit: 'contain',
},
}
}
>
<ImageListItem
sx={{
Expand Down
5 changes: 4 additions & 1 deletion apps/storefront/src/components/layout/B3Mainheader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { CallbackKey, useCallbacks } from '@b3/hooks'
import { useB3Lang } from '@b3/lang'
import { Box, Button, Typography } from '@mui/material'

import useMobile from '@/hooks/useMobile'
import { CustomStyleContext } from '@/shared/customStyleButtton'
import { GlobaledContext } from '@/shared/global'
import { store } from '@/store'
Expand All @@ -21,6 +22,7 @@ export default function B3Mainheader({ title }: { title: string }) {
const { global } = store.getState()
const navigate = useNavigate()
const b3Lang = useB3Lang()
const [isMobile] = useMobile()

const {
state: {
Expand Down Expand Up @@ -149,7 +151,8 @@ export default function B3Mainheader({ title }: { title: string }) {
lineHeight: '42px',
display: 'flex',
alignItems: 'end',
mb: '8px',
mb: '24px',
mt: isMobile ? 0 : '24px',
color: customColor,
}}
>
Expand Down
2 changes: 1 addition & 1 deletion apps/storefront/src/components/layout/B3MobileLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default function B3MobileLayout({
sx={{
p: 0,
m: 0,
mb: '2vw',
mb: '6vw',
fontSize: '34px',
fontWeight: '400',
color: customColor || '#263238',
Expand Down
8 changes: 7 additions & 1 deletion apps/storefront/src/pages/quote/QuoteDraft.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,13 @@ function QuoteDraft({ setOpenPage }: QuoteDraftProps) {
marginRight: '0.5rem',
}}
/>
<p>{backText()}</p>
<p
style={{
margin: '0',
}}
>
{backText()}
</p>
</Box>
</Box>
<Box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ function QuoteDetailHeader(props: QuoteDetailHeaderProps) {
<p
style={{
color: primaryColor,
margin: '0',
}}
>
{b3Lang('quoteDetail.header.backToQuoteLists')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function ShoppingDetailHeader(props: ShoppingDetailHeaderProps) {
sx={{
margin: 0,
color: customColor,
m: '16px 0',
m: '0',
}}
>
{openAPPParams.shoppingListBtn !== 'add'
Expand Down

0 comments on commit 1ed88ce

Please sign in to comment.