1
|
|
|
import React, { useContext } from 'react'; |
2
|
|
|
import PropTypes from 'prop-types'; |
3
|
|
|
import { Link } from 'react-router-dom'; |
4
|
|
|
import { Card, CardBody, Col, Row } from 'reactstrap'; |
5
|
|
|
import Background from '../components/common/Background'; |
6
|
|
|
import Flex from '../components/common/Flex'; |
7
|
|
|
import Section from '../components/common/Section'; |
8
|
|
|
import AppContext from '../context/Context'; |
9
|
|
|
|
10
|
|
|
import bgShape from '../assets/img/illustrations/bg-shape.png'; |
11
|
|
|
import shape1 from '../assets/img/illustrations/shape-1.png'; |
12
|
|
|
import halfCircle from '../assets/img/illustrations/half-circle.png'; |
13
|
|
|
|
14
|
|
|
const AuthCardLayout = ({ leftSideContent, children }) => { |
15
|
|
|
const { isDark } = useContext(AppContext); |
16
|
|
|
return ( |
17
|
|
|
<Section fluid className="py-0"> |
18
|
|
|
<Row noGutters className="min-vh-100 flex-center"> |
19
|
|
|
<Col lg={8} className="col-xxl-5 py-3"> |
20
|
|
|
<img className="bg-auth-circle-shape" src={bgShape} alt="" width="250" /> |
21
|
|
|
<img className="bg-auth-circle-shape-2" src={shape1} alt="" width="150" /> |
22
|
|
|
<Card className="overflow-hidden z-index-1"> |
23
|
|
|
<CardBody className="p-0"> |
24
|
|
|
<Row noGutters className="h-100"> |
25
|
|
|
<Col md={5} className="text-white text-center bg-card-gradient"> |
26
|
|
|
<div className="position-relative p-4 pt-md-5 pb-md-7"> |
27
|
|
|
<Background image={halfCircle} className="bg-auth-card-shape" /> |
28
|
|
|
<div className="z-index-1 position-relative"> |
29
|
|
|
<Link |
30
|
|
|
className="text-white mb-4 text-sans-serif font-weight-extra-bold fs-4 d-inline-block" |
31
|
|
|
to="/" |
32
|
|
|
> |
33
|
|
|
falcon |
34
|
|
|
</Link> |
35
|
|
|
<p className={isDark ? 'text-800' : 'text-100'}> |
36
|
|
|
With the power of Falcon, you can now focus only on functionaries for your digital products, |
37
|
|
|
while leaving the UI design on us! |
38
|
|
|
</p> |
39
|
|
|
</div> |
40
|
|
|
</div> |
41
|
|
|
<div className="mt-3 mb-4 mt-md-4 mb-md-5">{leftSideContent}</div> |
42
|
|
|
</Col> |
43
|
|
|
<Col md={7} tag={Flex} align="center" justify="center"> |
44
|
|
|
<div className="p-4 p-md-5 flex-grow-1">{children}</div> |
45
|
|
|
</Col> |
46
|
|
|
</Row> |
47
|
|
|
</CardBody> |
48
|
|
|
</Card> |
49
|
|
|
</Col> |
50
|
|
|
</Row> |
51
|
|
|
</Section> |
52
|
|
|
); |
53
|
|
|
}; |
54
|
|
|
AuthCardLayout.propTypes = { |
55
|
|
|
leftSideContent: PropTypes.node.isRequired, |
56
|
|
|
children: PropTypes.node.isRequired |
57
|
|
|
}; |
58
|
|
|
|
59
|
|
|
export default AuthCardLayout; |
60
|
|
|
|