120 lines
1.8 KiB
JavaScript
Raw Normal View History

import styled, { keyframes } from 'styled-components';
const Wrapper = styled.div`
2019-02-14 10:36:20 +01:00
position: fixed;
right: 15px;
bottom: 15px;
button,
button:focus,
a {
cursor: pointer;
outline: 0;
}
p {
margin-bottom: 0;
}
.videosHeader {
2019-02-22 12:20:16 +01:00
padding: 25px 15px 0 15px;
2019-02-14 10:36:20 +01:00
p {
display: inline-block;
vertical-align: top;
2019-02-26 17:11:13 +01:00
width: 50%;
2019-02-27 14:27:18 +01:00
font-family: Lato;
font-weight: bold;
2019-02-26 17:11:13 +01:00
font-size: 11px;
2019-02-14 10:36:20 +01:00
color: #5c5f66;
2019-02-26 17:11:13 +01:00
letter-spacing: 0.5px;
text-transform: uppercase;
2019-02-14 10:36:20 +01:00
&:last-of-type {
color: #5a9e06;
2019-02-26 17:11:13 +01:00
text-align: right;
2019-02-14 10:36:20 +01:00
}
}
}
2019-02-22 10:09:07 +01:00
&.visible {
opacity: 1;
2019-07-29 17:11:53 +02:00
z-index: 10;
2019-02-22 10:09:07 +01:00
}
&.hidden {
opacity: 0;
}
2019-02-14 10:36:20 +01:00
.videosContent {
2019-02-22 10:09:07 +01:00
min-width: 320px;
2019-02-14 10:36:20 +01:00
margin-bottom: 10px;
margin-right: 15px;
2019-02-26 17:11:13 +01:00
background-color: white;
2019-02-14 10:36:20 +01:00
box-shadow: 0 2px 4px 0 #e3e9f3;
border-radius: 3px;
2019-02-26 17:11:13 +01:00
overflow: hidden;
2019-02-14 10:36:20 +01:00
&.shown {
animation: ${fadeIn} 0.5s forwards;
2019-02-14 10:36:20 +01:00
}
&.hide {
animation: ${fadeOut} 0.5s forwards;
2019-02-14 10:36:20 +01:00
}
ul {
padding: 10px 0;
2019-02-22 12:20:16 +01:00
margin-bottom: 0;
2019-02-26 17:11:13 +01:00
list-style: none;
2019-02-14 10:36:20 +01:00
}
}
.openBtn {
2019-02-26 17:11:13 +01:00
float: right;
2019-02-14 10:36:20 +01:00
width: 38px;
height: 38px;
button {
width: 100%;
height: 100%;
border-radius: 50%;
color: white;
background: #0e7de7;
box-shadow: 0px 2px 4px 0px rgba(227, 233, 243, 1);
i:last-of-type {
display: none;
}
&.active {
i:first-of-type {
display: none;
}
i:last-of-type {
display: block;
}
}
}
}
`;
2019-02-22 10:09:07 +01:00
const fadeIn = keyframes`
0% {
width: auto;
height: auto;
opacity: 0;
}
2019-02-22 10:09:07 +01:00
5% {
opacity: 0;
2019-02-22 10:09:07 +01:00
}
100% {
opacity: 1;
}
`;
const fadeOut = keyframes`
0% {
opacity: 1;
}
2019-02-22 10:09:07 +01:00
60% {
opacity: 0;
}
2019-02-22 10:09:07 +01:00
100% {
opacity: 0;
width: 0;
height: 0;
2019-03-26 20:54:16 +01:00
}
`;
export default Wrapper;