Remove app box shadow and fix tabs display
This commit is contained in:
@@ -4,10 +4,11 @@ import {useRouter} from 'next/router'
|
|||||||
|
|
||||||
import {styled} from '@mui/material/styles'
|
import {styled} from '@mui/material/styles'
|
||||||
import AppBar from '@mui/material/AppBar'
|
import AppBar from '@mui/material/AppBar'
|
||||||
import Tabs from '@mui/material/Tabs'
|
import Tabs, {tabsClasses} from '@mui/material/Tabs'
|
||||||
import Tab from '@mui/material/Tab'
|
import Tab from '@mui/material/Tab'
|
||||||
import Typography from '@mui/material/Typography'
|
import Typography from '@mui/material/Typography'
|
||||||
import Box from '@mui/material/Box'
|
import Box from '@mui/material/Box'
|
||||||
|
import {useMediaQuery} from '@mui/material'
|
||||||
|
|
||||||
const PREFIX = 'navigasyon'
|
const PREFIX = 'navigasyon'
|
||||||
|
|
||||||
@@ -76,7 +77,7 @@ function a11yProps(index) {
|
|||||||
|
|
||||||
export default function Navigasyon({selectedTab}) {
|
export default function Navigasyon({selectedTab}) {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const isMobile = useMediaQuery('(max-width:422px)')
|
||||||
const [value, setValue] = useState(0)
|
const [value, setValue] = useState(0)
|
||||||
|
|
||||||
const handleChange = (event, newValue) => {
|
const handleChange = (event, newValue) => {
|
||||||
@@ -90,14 +91,21 @@ export default function Navigasyon({selectedTab}) {
|
|||||||
return (
|
return (
|
||||||
<Appdiv>
|
<Appdiv>
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
<AppBar style={{zIndex: 1}} position='fixed' color='default'>
|
<AppBar style={{zIndex: 1, boxShadow: 'none'}} position='fixed' color='default'>
|
||||||
<Tabs
|
<Tabs
|
||||||
centered
|
allowScrollButtonsMobile
|
||||||
|
centered={Boolean(!isMobile)}
|
||||||
value={selectedTab}
|
value={selectedTab}
|
||||||
variant='fullWidth'
|
|
||||||
indicatorColor='primary'
|
indicatorColor='primary'
|
||||||
textColor='primary'
|
textColor='primary'
|
||||||
aria-label='tabs menu'
|
aria-label='tabs menu'
|
||||||
|
variant={isMobile ? 'scrollable' : 'fullWidth'}
|
||||||
|
scrollButtons='auto'
|
||||||
|
sx={{
|
||||||
|
[`& .${tabsClasses.scrollButtons}`]: {
|
||||||
|
'&.Mui-disabled': {opacity: 0.3},
|
||||||
|
},
|
||||||
|
}}
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
>
|
>
|
||||||
<Tab label='Accueil' {...a11yProps(0)} />
|
<Tab label='Accueil' {...a11yProps(0)} />
|
||||||
|
|||||||
Reference in New Issue
Block a user