/*Copyright (C) 2019 Centro de Computacao Cientifica e Software Livre Departamento de Informatica - Universidade Federal do Parana This file is part of Plataforma Integrada MEC. Plataforma Integrada MEC is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Plataforma Integrada MEC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>.*/ import React from 'react'; import { Button } from '@material-ui/core'; import Modal from '@material-ui/core/Modal'; import Backdrop from '@material-ui/core/Backdrop'; import Fade from '@material-ui/core/Fade'; import styled from 'styled-components' import Grid from '@material-ui/core/Grid'; import Facebook from '../img/facebook.svg' import Twitter from '../img/twitter.svg' import LinkIcon from '../img/link_icon.svg' import CloseModalButton from './CloseModalButton.js' export default function ModalLearningObjectPublished (props) { // const refContainer = useRef(props.link); // function copyToClipboard(e) { // let copyText = document.getElementById('p-text') // console.log(copyText) // }; return ( <StyledModal aria-labelledby="transition-modal-title" aria-describedby="transition-modal-description" open={props.open} centered="true" onClose={props.handleClose} closeAfterTransition BackdropComponent={Backdrop} BackdropProps={{ timeout: 500, }} > <Fade in={props.open}> <Container> <Header> <span style={{width:"32px"}}/> <h2>O seu recurso foi para a curadoria!</h2> <CloseModalButton handleClose={props.handleClose}/> </Header> <Content > <Grid container> <Grid item xs={4} style={{paddingRight : "15px", paddingLeft : "15px"}}> <div className="backgroundImg"/> </Grid> <Grid item xs={8} style={{paddingRight : "15px", paddingLeft : "15px", paddingTop : "20px"}}> <div className="main-content-text"> <p>Seu recurso estará disponível na plataforma após a avaliação da curadoria. Você receberá notificações sempre que alguém favoritar, compartilhar e relatar experiência com o Recurso.</p> </div> </Grid> </Grid> </Content> <ShareContainer> <p>Gostaria de convidar o seus amigos para conhecer o recurso?</p> <p>Compartilhe nas redes sociais:</p> <div className="logos-shared"> <a href={"https://www.facebook.com/sharer/sharer.php?u=https://plataformaintegrada.mec.gov.br/recurso/" + props.draftID} rel="noreferrer" target="_blank"> <ShareButton> <img src={Facebook} alt="facebook-logo"/> </ShareButton> </a> <a href={"https://www.twitter.com/intent/tweet?url=https://plataformaintegrada.mec.gov.br/recurso/" + props.draftID} rel="noreferrer" target="_blank"> <ShareButton> <img src={Twitter} alt="twitter-logo"/> </ShareButton> </a> <ShareButton > <img src={LinkIcon} alt="link-icon"/> </ShareButton> </div> </ShareContainer> </Container> </Fade> </StyledModal> ) } const ShareButton = styled(Button)` text-align :center; margin : 0 !important; .MuiButton-label { display : flex !important; flex-direction : column !important; justify-content : center !important; font-weight : 700 !important; } img { height : 50px; width : 50px; padding-top : 10px; vertical-align : middle; } p { margin : 0 0 10px; } ` const ShareContainer = styled.div` padding-top : 20px; background-color : #f1f1f1; width : 100%; height : 215px; font-size : 18px; line-height : 30px; text-align : center; max-width : 600px; color : #666; border-radius : 4px; .logos-shared { font-size : 18px; line-height : 30px; text-align : center; display : flex; flex-direction : row; justify-content : center; } ` const Content = styled.div` padding : 20px 30px; overflow : visible; max-width : 600px; color : #666; .backgroundImg { background-image : url(https://plataformaintegrada.mec.gov.br/img/Publicar.png); width : 145px; height : 125px; background-repeat : no-repeat; background-size : contain; margin : 0; } .main-content-text { font-size : 15px; line-height : 22px; text-align : justify; } ` const Header = styled.div` display : flex; flex-direction : row; padding : 10px 26px 0 26px; align-items : center; justify-content : space-between; height : 64px; h2 { font-size : 26px; font-weight : lighter; color : #666 } ` const StyledModal = styled(Modal)` .djXaxP{ margin : 0 !important; } display : flex; align-items: center; justify-content : center; text-align : center; padding : 10px !important; max-width : none; max-height : none; ` const Container = styled.div` box-sizing : border-box; box-shadow : 0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12); background-color : #fff; align : center; display : flex; flex-direction : column; min-width : 240px; max-height : none; position : relative; border-radius : 4px; @media screen and (min-width : 700px) { max-width : 600px; } @media screen and (max-width : 699px) { width : 100%; height : 100%; } p { margin : 0 0 10px; } `