Skip to content
Snippets Groups Projects
ModalConfirmarUnfollow.js 4.12 KiB
Newer Older
import React from 'react';
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'
    .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 HeaderDiv = styled.div`
    display : flex;
    flex-direction : row;
    text-align : center;
    margin : 20px 30px;

    h3 {
        font-size : 24px;
        margin-top : 20px;
        margin-bottpm : 10px
        font-weight : normal;
    }
vgm18's avatar
vgm18 committed
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"};

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

    @media screen and (max-width : 899px) {
        width : 100%;
        max-height : 600px;
    }
vgm18's avatar
vgm18 committed
color: ${props => props.contrast === "" ? "#666 !important" : "yellow !important"};
text-decoration: ${props => props.contrast === "" ? "none !important" : "yellow underline !important"};

    &:hover {
        background-color : rgba(158,158,158,0.2) !important;
    }
    outline : none !important;
    text-align : center !important;
`

const ButtonConfirmar = styled(Button)`
vgm18's avatar
vgm18 committed
    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"};
export default function ModalConfirmarUnfollow (props) {
    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}
        centered="true"
        onClose={props.handleClose}
        closeAfterTransition
        BackdropComponent={Backdrop}
        BackdropProps={{
            timeout: 500,
        }}
        >
            <Fade in={props.open}>
vgm18's avatar
vgm18 committed
                <ContentContainer contrast={props.contrast}>
vgm18's avatar
vgm18 committed
                        <CloseModalButton contrast={props.contrast} handleClose={props.handleClose}/>
                    </HeaderDiv>
                    <div style={{display : "flex", flexDirection : "column", padding : "20px 30px"}}>
                        <div style={{marginTop : "0", textAlign : "center", marginBottom : "20px"}}>
vgm18's avatar
vgm18 committed
                            <span style={{fontSize : "14px"}}>{text.explanation}</span>
                        </div>
                        <div style={{display : "flex", flexDirection : "row", justifyContent: "space-evenly"}}>
vgm18's avatar
vgm18 committed
                            <ButtonCancelar contrast={props.contrast} onClick={props.handleClose}>CANCELAR</ButtonCancelar>
                            <ButtonConfirmar contrast={props.contrast} onClick={props.handleConfirm}>DEIXAR DE SEGUIR </ButtonConfirmar>