Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 631 | Rev 2157 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 631 Rev 641
Línea 12... Línea 12...
12
  TwitterIcon,
12
  TwitterIcon,
13
  TwitterShareButton,
13
  TwitterShareButton,
14
  WhatsappIcon,
14
  WhatsappIcon,
15
  WhatsappShareButton,
15
  WhatsappShareButton,
16
} from "react-share";
16
} from "react-share";
17
import { addNotification } from "../../../redux/notification/notification.actions";
17
import { addNotification } from "store/notification/notification.actions";
18
import { axios } from "../../../utils";
18
import { axios } from "../../../utils";
-
 
19
import styled from "styled-components";
-
 
20
 
-
 
21
const StyledShareContainer = styled.div`
-
 
22
  display: flex;
-
 
23
  position: absolute;
-
 
24
  align-items: center;
-
 
25
  padding: 5px 1rem;
-
 
26
  bottom: calc(100% + 0.5rem);
-
 
27
  gap: 0.5rem;
-
 
28
  right: 0;
-
 
29
  width: 16.5rem;
-
 
30
  border-radius: 10px;
-
 
31
  background-color: #fff;
-
 
32
  box-shadow: 0px 4px 4px -2px rgb(0 0 0 / 12%),
-
 
33
    0px -4px 4px -2px rgb(0 0 0 / 12%);
-
 
34
`;
Línea 19... Línea 35...
19
 
35
 
20
export default function withExternalShare(Component, url) {
36
export default function withExternalShare(Component, url) {
21
  return function (props) {
37
  return function (props) {
22
    const [shareOptions, setShareOptions] = useState(false);
38
    const [shareOptions, setShareOptions] = useState(false);
Línea 62... Línea 78...
62
    }, [shareOptions]);
78
    }, [shareOptions]);
Línea 63... Línea 79...
63
 
79
 
64
    return (
80
    return (
65
      <Component onClick={toggleShareOptions} {...props}>
81
      <Component onClick={toggleShareOptions} {...props}>
66
        {shareOptions && (
82
        {shareOptions && (
67
          <div className="external__share">
83
          <StyledShareContainer>
68
            <FacebookShareButton
84
            <FacebookShareButton
69
              url={shareUrl}
85
              url={shareUrl}
70
              onShareWindowClose={() => incrementCount()}
86
              onShareWindowClose={() => incrementCount()}
71
            >
87
            >
Línea 99... Línea 115...
99
              url={shareUrl}
115
              url={shareUrl}
100
              onShareWindowClose={() => incrementCount()}
116
              onShareWindowClose={() => incrementCount()}
101
            >
117
            >
102
              <EmailIcon size={32} round />
118
              <EmailIcon size={32} round />
103
            </EmailShareButton>
119
            </EmailShareButton>
104
          </div>
120
          </StyledShareContainer>
105
        )}
121
        )}
106
      </Component>
122
      </Component>
107
    );
123
    );
108
  };
124
  };
109
}
125
}