From 86cbc87f3ae79dc3fc698367f839ee709a76f059 Mon Sep 17 00:00:00 2001 From: tanmaynigde <53892207+tanmaynigde@users.noreply.github.com> Date: Thu, 15 Oct 2020 13:30:58 +0530 Subject: [PATCH] Create example2.js --- example/example2.js | 235 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 example/example2.js diff --git a/example/example2.js b/example/example2.js new file mode 100644 index 0000000..dcee983 --- /dev/null +++ b/example/example2.js @@ -0,0 +1,235 @@ +import React from 'react'; +import AppBar from '@material-ui/core/AppBar'; +import Button from '@material-ui/core/Button'; +import Card from '@material-ui/core/Card'; +import CardActions from '@material-ui/core/CardActions'; +import CardContent from '@material-ui/core/CardContent'; +import CardHeader from '@material-ui/core/CardHeader'; +import CssBaseline from '@material-ui/core/CssBaseline'; +import Grid from '@material-ui/core/Grid'; +import StarIcon from '@material-ui/icons/StarBorder'; +import Toolbar from '@material-ui/core/Toolbar'; +import Typography from '@material-ui/core/Typography'; +import Link from '@material-ui/core/Link'; +import { makeStyles } from '@material-ui/core/styles'; +import Container from '@material-ui/core/Container'; +import Box from '@material-ui/core/Box'; + +function Copyright() { + return ( + + {'Copyright © '} + + Your Website + {' '} + {new Date().getFullYear()} + {'.'} + + ); +} + +const useStyles = makeStyles((theme) => ({ + '@global': { + ul: { + margin: 0, + padding: 0, + listStyle: 'none', + }, + }, + appBar: { + borderBottom: `1px solid ${theme.palette.divider}`, + }, + toolbar: { + flexWrap: 'wrap', + }, + toolbarTitle: { + flexGrow: 1, + }, + link: { + margin: theme.spacing(1, 1.5), + }, + heroContent: { + padding: theme.spacing(8, 0, 6), + }, + cardHeader: { + backgroundColor: + theme.palette.type === 'light' ? theme.palette.grey[200] : theme.palette.grey[700], + }, + cardPricing: { + display: 'flex', + justifyContent: 'center', + alignItems: 'baseline', + marginBottom: theme.spacing(2), + }, + footer: { + borderTop: `1px solid ${theme.palette.divider}`, + marginTop: theme.spacing(8), + paddingTop: theme.spacing(3), + paddingBottom: theme.spacing(3), + [theme.breakpoints.up('sm')]: { + paddingTop: theme.spacing(6), + paddingBottom: theme.spacing(6), + }, + }, +})); + +const tiers = [ + { + title: 'Free', + price: '0', + description: ['10 users included', '2 GB of storage', 'Help center access', 'Email support'], + buttonText: 'Sign up for free', + buttonVariant: 'outlined', + }, + { + title: 'Pro', + subheader: 'Most popular', + price: '15', + description: [ + '20 users included', + '10 GB of storage', + 'Help center access', + 'Priority email support', + ], + buttonText: 'Get started', + buttonVariant: 'contained', + }, + { + title: 'Enterprise', + price: '30', + description: [ + '50 users included', + '30 GB of storage', + 'Help center access', + 'Phone & email support', + ], + buttonText: 'Contact us', + buttonVariant: 'outlined', + }, +]; +const footers = [ + { + title: 'Company', + description: ['Team', 'History', 'Contact us', 'Locations'], + }, + { + title: 'Features', + description: ['Cool stuff', 'Random feature', 'Team feature', 'Developer stuff', 'Another one'], + }, + { + title: 'Resources', + description: ['Resource', 'Resource name', 'Another resource', 'Final resource'], + }, + { + title: 'Legal', + description: ['Privacy policy', 'Terms of use'], + }, +]; + +export default function Pricing() { + const classes = useStyles(); + + return ( + + + + + + Company name + + + + + + {/* Hero unit */} + + + Pricing + + + Quickly build an effective pricing table for your potential customers with this layout. + It's built with default Material-UI components with little customization. + + + {/* End hero unit */} + + + {tiers.map((tier) => ( + // Enterprise card is full width at sm breakpoint + + + : null} + className={classes.cardHeader} + /> + +
+ + ${tier.price} + + + /mo + +
+
    + {tier.description.map((line) => ( + + {line} + + ))} +
+
+ + + +
+
+ ))} +
+
+ {/* Footer */} + + + {footers.map((footer) => ( + + + {footer.title} + +
    + {footer.description.map((item) => ( +
  • + + {item} + +
  • + ))} +
+
+ ))} +
+ + + +
+ {/* End footer */} +
+ ); +}