-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathindex.jsx
More file actions
147 lines (138 loc) · 4.15 KB
/
index.jsx
File metadata and controls
147 lines (138 loc) · 4.15 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
import React from "react";
import { Typography, Grid, Paper, Divider, Button } from "@material-ui/core";
import { Link } from "react-router-dom";
import LBannerAnimation from "./animation.jsx";
function HomePage() {
return (
<div>
<Grid container spacing={5} justify="center" alignItems="center">
<Grid item md={6} sm={12}>
<Typography
variant="h1"
style={{
fontSize: "calc(4rem + 6 * ((100vw - 320px) / 680))",
fontStyle : "bold"
}}
>
Exploring
Possibilities
</Typography>
<Typography
variant="h4"
style={{ fontWeight: "25", fontStyle: "italic"}}
>
with React Native Elements
</Typography>
</Grid>
<Grid item md={6} sm={12}>
<div style={{}}>
<LBannerAnimation />
</div>
</Grid>
</Grid>
<div style={{ width: "100%", textAlign: "center", marginBottom: "2rem" }}>
<Link to="/explore">
<Button variant="outlined" color="Primary">
<Typography variant="h6"> Explore Now</Typography>
</Button>
</Link>
</div>
<Grid clasname={'image'} container spacing={1} justify="center">
{FEATURES_LIST.map((feature, idx) => {
return (
<Grid item xs={6} md={4} lg={3} key={idx}>
<FeatureCard {...feature} />
</Grid>
);
})}
</Grid>
<Divider style={{ margin: "3vh 0" }} />
<Grid
container
spacing={5}
justify="center"
style={{ justifyContent: "space-evenly" }}
>
<Grid item xs={12} md={7} lg={6}>
<Typography variant="h5"
style={{
textAlign : "centre",
}}>
Why?
</Typography>
<Typography
style={{
textAlign : "centre",
}}>
React Native Elements houses a lot of components, and these
components come with a lot of customisation and tweaks via props.
Sometimes the user gets confused and wastes a lot of time in
achieving the desired result.
<br />
We came across a lot of such questions every day and sometimes user
reports bugs which aren't bugs but just improper
implementation/usage of the components.
</Typography>
</Grid>
<Grid item xs={12} md={5} lg={5}>
<Typography variant="h5"
style={{
textAlign : "centre",
}}>How it solves the problem?</Typography>
<Typography
style={{
textAlign : "centre",
}}>
With Playground, users can explore components and tweak them as per
their use-case and generate production-ready code. Or they can
explore new possibilities with the components and improve the
overall experience.
</Typography>
</Grid>
</Grid>
</div>
);
}
export default HomePage;
const FeatureCard = (props) => {
return (
<Paper style={{ padding: "14px 7px", height: "100%" }}>
<img
style={{
width: "70%",
minHeight: 250,
margin: "auto",
display: "flex",
}}
alt="playground-banner"
src={props.banner}
/>
<div style={{ bottom: 0, marginTop: "1rem" }}>
<Typography variant="h5">{props.title}</Typography>
<Typography>{props.content}</Typography>
</div>
</Paper>
);
};
const FEATURES_LIST = [
{
banner: require("../../assets/SVG/design.svg"),
title: "Design",
content: "From Design -> Code.",
},
{
banner: require("../../assets/SVG/tweak.svg"),
title: "Tweak",
content: "Tweak components for the best-fit.",
},
{
banner: require("../../assets/SVG/explore.svg"),
title: "Explore",
content: "Explore new possibilities",
},
{
banner: require("../../assets/SVG/bootstrap.svg"),
title: "Bootstrap",
content: "Shhh... Generate code, bootstrap applications and relax.",
},
];