Skip to content
Snippets Groups Projects
Commit ca866d21 authored by lfr20's avatar lfr20
Browse files

Add Paper component

parent 3dda9266
No related branches found
No related tags found
6 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!39Update admin system,!32Homologa,!31Fix console error,!27Training materials
import React from 'react'; import React from 'react';
import { Typography } from "@material-ui/core";
import { makeStyles } from '@material-ui/core/styles'; import { makeStyles } from '@material-ui/core/styles';
import styled from 'styled-components'; import styled from 'styled-components';
import Chip from '@material-ui/core/Chip'; import Chip from '@material-ui/core/Chip';
import Grid from '@material-ui/core/Grid'; import Grid from '@material-ui/core/Grid';
import { Container } from "react-grid-system"; import Button from '@material-ui/core/Button';
import ExpandedMaterialCard from './ExpandedMaterialCard';
import Paper from '@material-ui/core/Paper';
import Library from '@material-ui/icons/LibraryBooks';
const useStyles = makeStyles((theme) => ({ const useStyles = makeStyles((theme) => ({
root: { root: {
...@@ -21,8 +23,8 @@ const ExpandedMaterial = (props) => { ...@@ -21,8 +23,8 @@ const ExpandedMaterial = (props) => {
const classes = useStyles(); const classes = useStyles();
return ( return (
<Container style={{ backgroundColor: "#444444", padding : "20px" }}> <Paper elevation={3} style={{ backgroundColor: "#444444", padding: "20px" }}>
<Grid container direction="row"> <Grid container direction="row" spacing={2}>
<Grid item direction="column" xs={4}> <Grid item direction="column" xs={4}>
<Grid item> <Grid item>
<Title variant="body2"> <Title variant="body2">
...@@ -31,30 +33,63 @@ const ExpandedMaterial = (props) => { ...@@ -31,30 +33,63 @@ const ExpandedMaterial = (props) => {
} }
</Title> </Title>
</Grid> </Grid>
<SizedHeightBox />
<Grid item> <Grid item>
<ChipsDiv className={classes.root}> <ChipsDiv className={classes.root}>
{ {
material.tags.map((tag, index) => { material.tags.map((tag, index) => {
return ( return (
<Chip color="default" label={tag.name} key={index} style={{padding : "0.5px"}} /> <Chip color="default" label={tag.name} key={index} style={{ padding: "0.5px" }} />
) )
}) })
} }
</ChipsDiv> </ChipsDiv>
</Grid> </Grid>
<div> <SizedHeightBox2 />
<DevelopedTypo> <Grid item direction="column" style={{ color: '#E5E7E9', fontWeight: "500" }}>
Desenvolvido por: <DevelopedByDiv>
</DevelopedTypo>
<DevelopedSpan>
{ {
material.developed `Desenvolvido por: ${material.developed}`
} }
</DevelopedSpan> </DevelopedByDiv>
</div> <SizedHeightBox3 />
<Button variant="contained" color="secondary">
Ver todos
</Button>
</Grid>
</Grid>
<Grid item direction="column" xs={8}>
<Grid container direction="row" alignItems="center">
<Library style={{ color: "White" }} />
<SizedWidthBox />
<Title>
{material.topics.length} módulos
</Title>
</Grid>
<SizedHeightBox />
<Grid container direction="row" spacing={3}>
{/* <Grid item md={3}>
<ExpandedMaterialCard
name={material.topics[1].pre_title + material.topics[1].title}
thumb={material.topics[1].img}
/>
</Grid> */}
{
material.topics.map((material, index) => {
return (
<Grid item key={index} md={4}>
<ExpandedMaterialCard
name={material.pre_title + material.title}
thumb={material.img}
/>
</Grid>
)
})
}
</Grid>
</Grid> </Grid>
</Grid> </Grid>
</Container> </Paper>
); );
} }
...@@ -64,21 +99,23 @@ const Title = styled.h3` ...@@ -64,21 +99,23 @@ const Title = styled.h3`
padding : 0; padding : 0;
margin : 0; margin : 0;
` `
const DevelopedByDiv = styled.div`
`
const ChipsDiv = styled.div` const ChipsDiv = styled.div`
margin-left : -5px; margin-left : -5px;
` `
const SizedHeightBox = styled.div`
const DevelopedSpan = styled.span` height : 3em;
color : white;
opacity : 0.9;
` `
const SizedHeightBox2 = styled.div`
const DevelopedTypo = styled(Typography)` height : 2em;
color : white; `
font-weight: bold; const SizedHeightBox3 = styled.div`
height : 0.5em;
`
const SizedWidthBox = styled.div`
width : 5px;
` `
export default ExpandedMaterial; export default ExpandedMaterial;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment