-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
39 lines (36 loc) · 939 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import React from 'react'
import { Grid, Typography } from '@mui/material'
import ReactTypingEffect from 'react-typing-effect'
const Header = ({ isDashain, children }) => {
const year = new Date().getFullYear()
const nepaliYear = '२०८१'
const greetingText = isDashain
? [`बडा दशैँ ${nepaliYear}`, `Dashain ${year}`]
: [`तिहार ${nepaliYear}`, `Tihar ${year}`]
return (
<React.Fragment>
<Grid item md={1} xs={12}></Grid>
<Grid
item
md={8}
xs={12}
sx={{
textAlign: 'center',
}}
>
<Typography
component={'div'}
sx={{
textAlign: 'center',
fontSize: '55px',
fontWeight: 'bold',
}}
>
<ReactTypingEffect text={greetingText} />
</Typography>
{children}
</Grid>
</React.Fragment>
)
}
export default Header