Add media query to justify teks
This commit is contained in:
@@ -11,7 +11,8 @@ import {
|
|||||||
Drawer,
|
Drawer,
|
||||||
Hidden,
|
Hidden,
|
||||||
IconButton,
|
IconButton,
|
||||||
Box
|
Box,
|
||||||
|
useMediaQuery
|
||||||
} from '@material-ui/core'
|
} from '@material-ui/core'
|
||||||
|
|
||||||
import KeyboardBackspaceIcon from '@material-ui/icons/KeyboardBackspace'
|
import KeyboardBackspaceIcon from '@material-ui/icons/KeyboardBackspace'
|
||||||
@@ -125,6 +126,7 @@ const langToArray = anTeks => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function TeksDrawer({teks, anTeks}) {
|
export default function TeksDrawer({teks, anTeks}) {
|
||||||
|
const isMobile = useMediaQuery('(max-width:800px)')
|
||||||
const langArray = langToArray(anTeks)
|
const langArray = langToArray(anTeks)
|
||||||
const classes = useStyles()
|
const classes = useStyles()
|
||||||
const theme = useTheme()
|
const theme = useTheme()
|
||||||
@@ -230,7 +232,7 @@ export default function TeksDrawer({teks, anTeks}) {
|
|||||||
<Typography align='center' className={classes.text} variant='h4'>
|
<Typography align='center' className={classes.text} variant='h4'>
|
||||||
Transcription
|
Transcription
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography paragraph align={langArray.length === 0 ? 'center' : 'justify'} component='span'>
|
<Typography paragraph align={langArray.length === 0 && isMobile ? 'justify' : 'center'} component='span'>
|
||||||
{formatJsonString(anTeks.transkripsyon)}
|
{formatJsonString(anTeks.transkripsyon)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user