Skip to content

Commit 234305c

Browse files
committed
make section title size respond to device type
1 parent 9a112c8 commit 234305c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/screens/landing-page/components/LandingPageSectionTitle.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@ import HStack from "../../../components/HStack";
22
import {Typography} from "@mui/material";
33
import VStack from "../../../components/VStack";
44
import React from "react";
5+
import {useStore} from "../../../components/ViewportUpdater";
56

67
const LandingPageSectionTitle = ({ title }) => {
8+
const isDesktop = useStore((state) => state.isDesktop);
9+
10+
const fontSize = isDesktop ? '48px' : '32px';
11+
712
return (
813
<VStack>
914
<HStack justifyContent={'center'} sx={{width: '100%'}}>
10-
<Typography sx={styles.titleText}>
15+
<Typography sx={{...styles.titleText, fontSize: fontSize}}>
1116
{title}
1217
</Typography>
1318
</HStack>
@@ -18,7 +23,6 @@ const LandingPageSectionTitle = ({ title }) => {
1823
const styles = {
1924
titleText: {
2025
fontWeight: 'bold',
21-
fontSize: '48px',
2226
textAlign: 'center',
2327
paddingBottom: '2px',
2428
borderBottom: '2px solid rgba(252, 215, 85)',

0 commit comments

Comments
 (0)