Newer
Older

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 CloseModalButton from './CloseModalButton'

Lucas Eduardo Schoenfelder
committed
const StyledModal = styled(Modal)`

Lucas Eduardo Schoenfelder
committed
display : flex;
align-items: center;
justify-content : center;
text-align : center;
padding : 10px !important;
max-width : none;
max-height : none;
`
const HeaderDiv = styled.div`
display : flex;

Lucas Eduardo Schoenfelder
committed
align-items : center;
text-align : center;
margin : 20px 30px;
h3 {
font-size : 24px;
margin-top : 20px;
margin-bottpm : 10px
font-weight : normal;
}

Lucas Eduardo Schoenfelder
committed
`
const ContentContainer = styled.div`
color: ${props => props.contrast === "" ? "#666 !important" : "white !important"};
background-color: ${props => props.contrast === "" ? "white !important" : "black !important"};
border: ${props => props.contrast === "" ? "1px solid black !important" : "1px solid white !important"};

Lucas Eduardo Schoenfelder
committed
box-sizing : border-box;
max-width : none;
align : center;
display : flex;
flex-direction : column;
min-width : 240px;
max-height : none;
position : relative;
padding : 10px;

Lucas Eduardo Schoenfelder
committed
border-radius : 4px;
@media screen and (max-width : 899px) {
width : 100%;
max-height : 600px;
}

Lucas Eduardo Schoenfelder
committed
`
const ButtonCancelar = styled(Button)`
color: ${props => props.contrast === "" ? "#666 !important" : "yellow !important"};
text-decoration: ${props => props.contrast === "" ? "none !important" : "yellow underline !important"};

Lucas Eduardo Schoenfelder
committed
&:hover {
background-color : rgba(158,158,158,0.2) !important;
}
outline : none !important;
text-align : center !important;
`
const ButtonConfirmar = styled(Button)`
color: ${props => props.contrast === "" ? "white !important" : "yellow !important"};
background-color: ${props => props.contrast === "" ? "#00bcd4 !important" : "black !important"};
text-decoration: ${props => props.contrast === "" ? "none !important" : "yellow underline !important"};
border: ${props => props.contrast === "" ? "none !important" : "1px solid white !important"};

Lucas Eduardo Schoenfelder
committed
border-radius : 3px !important;
`
export default function ModalConfirmarUnfollow (props) {

Lucas Eduardo Schoenfelder
committed
const text = {
header : "Tem certeza que deseja deixar de seguir este usuário?",
explanation : "Este usuário deixará de fazer parte da sua rede."
}
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}>

Lucas Eduardo Schoenfelder
committed
<HeaderDiv>
<span style={{width:"32px"}}/>

Lucas Eduardo Schoenfelder
committed
{text.header}
</h3>
<CloseModalButton contrast={props.contrast} handleClose={props.handleClose}/>

Lucas Eduardo Schoenfelder
committed
</HeaderDiv>
<div style={{display : "flex", flexDirection : "column", padding : "20px 30px"}}>
<div style={{marginTop : "0", textAlign : "center", marginBottom : "20px"}}>
<span style={{fontSize : "14px"}}>{text.explanation}</span>

Lucas Eduardo Schoenfelder
committed
</div>
<div style={{display : "flex", flexDirection : "row", justifyContent: "space-evenly"}}>
<ButtonCancelar contrast={props.contrast} onClick={props.handleClose}>CANCELAR</ButtonCancelar>
<ButtonConfirmar contrast={props.contrast} onClick={props.handleConfirm}>DEIXAR DE SEGUIR </ButtonConfirmar>