Newer
Older
import React, {useState} from 'react';

Lucas Eduardo Schoenfelder
committed
import Modal from '@material-ui/core/Modal';
import Fade from '@material-ui/core/Fade';
import styled from 'styled-components'
import { Button } from '@material-ui/core';
import Backdrop from '@material-ui/core/Backdrop';
import CloseIcon from '@material-ui/icons/Close';
import LabeledCheckbox from "../Components/Checkbox.js"
import {Link} from 'react-router-dom'

Lucas Eduardo Schoenfelder
committed
import { Publicar } from "ImportImages.js";

Lucas Eduardo Schoenfelder
committed
const StyledDivContainer = styled.div`

Lucas Eduardo Schoenfelder
committed
border-radius : 4px;
border-shadow : #000;
color : rgb(102,102,102);
display : flex;
flex-direction : column;
max-width : none;
width : 640px;
max-height : none;
align : center;
`
const StyledDivHeader = styled.div`
text-align : center;
display : flex;
justify-content : space-between;
padding : 10px 26px 0 26px;

Lucas Eduardo Schoenfelder
committed
color : #666;
font-size : 40px;
font-weight : 400;
height : 64px;
justify-content : space-between;
`
const StyledDivDialogContent = styled.div`

Lucas Eduardo Schoenfelder
committed
`
const StyledButtonsDiv = styled.div`
margin-top : 10px;
justify-content : space-evenly;
display: flex;
`
const StyledButton = styled(Button)`
background-color : #00acc1 !important;

Lucas Eduardo Schoenfelder
committed
`
const StyledH2 = styled.h2`
font-size : 26px;
font-weight : lighter;
`
const StyledModal = styled(Modal)`
margin : 0 !important;
margin-left : 0 !important;
display : flex;
align-items: center;
justify-content : center;
text-align : center;
padding : 10px !important;
border-radius : 4px;
max-width : none;
max-height : none;
min-width: 240px;
min-height: 150px !important;
`
const StyledDivContentInformation = styled.div`
margin-top : 0;
padding-top : 20px;
`
const Styledspan = styled.span`
font-size: 12px;
font-weight: 400;
padding-top: 2px;
`
export default function ColaborarModal (props) {
// const {state, dispatch} = useContext(Store)
const [checkbox, controlCheckbox] = useState(false)
const handleCheckbox = () => controlCheckbox(!checkbox)

Lucas Eduardo Schoenfelder
committed
return (
<StyledModal
aria-labelledby="transition-modal-title"
aria-describedby="transition-modal-description"
open={props.open}

Lucas Eduardo Schoenfelder
committed
onClose={props.handleClose}
closeAfterTransition
BackdropComponent={Backdrop}
BackdropProps={{
timeout: 500,
}}
>
<Fade in={props.open}>
<StyledDivContainer>
<StyledDivHeader>
<span style={{width:"32px"}}/>

Lucas Eduardo Schoenfelder
committed
<StyledH2>
Você é professor(a), da educação básica, e gostaria de colaborar com a Plataforma?
</StyledH2>
<Button style={{marginRight:"-8px", color:"000"}} onClick={props.handleClose}>
<CloseIcon style={{color:"#666", cursor:"pointer", verticalAlign:"middle"}}/>
</Button>
</StyledDivHeader>
<div style={{padding : "20px 30px"}}>
<StyledDivDialogContent>
<StyledDivContentInformation
style={{backgroundImage : Publicar,

Lucas Eduardo Schoenfelder
committed
backgroundSize : "130px", backgroundPositionY:"20px",
backgroundRepeat:"no-repeat"
}}
>
<div style={{maxWidth:"350px", marginRight:"0", marginLeft:"auto", color:"#666"}}>
<p style={{textAlign:"justify", fontSize:"15px", margin:"0 0 10"}}>

Lucas Eduardo Schoenfelder
committed
Ao ser identificado como professor(a), você poderá
<span style={{color:"#00bcd4"}}> publicar e compartilhar recursos educacionais digitais </span>
na plataforma com toda a comunidade escolar do país.
</p>
<StyledButtonsDiv>
<Link to={{
pathname : "/termos-publicar-recurso",
state : true
}}>
<StyledButton>
<span style={{color:"#fff"}}>SIM</span>
</StyledButton>
</Link>

Lucas Eduardo Schoenfelder
committed
<StyledButton>
<span style={{color:"#fff"}}>NÃO</span>
</StyledButton>
</StyledButtonsDiv>
</div>
<div style={{display:"flex", alignItems:"flex-start"}}>
<LabeledCheckbox label={<Styledspan>Não perguntar novamente!</Styledspan>} checked={checkbox} handleChange={handleCheckbox}/>