2021-10-26 03:21:27 +08:00
|
|
|
import styled from 'styled-components';
|
|
|
|
import { List } from 'react-virtualized';
|
2021-11-11 03:10:35 +08:00
|
|
|
import ReactModal from 'react-modal';
|
2021-10-26 03:21:27 +08:00
|
|
|
|
|
|
|
const ScrollboxVertical = styled.div`
|
|
|
|
overflow-y: auto;
|
|
|
|
background: linear-gradient(white 30%, rgba(255,255,255,0)),
|
|
|
|
linear-gradient(rgba(255,255,255,0), white 70%) 0 100%,
|
|
|
|
/* Shadows */
|
|
|
|
radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.2), rgba(0,0,0,0)),
|
|
|
|
radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%;
|
|
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-color: transparent;
|
|
|
|
background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
|
|
|
|
background-attachment: local, local, scroll, scroll;
|
|
|
|
|
|
|
|
// Fancy scroll
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
width: 5px;
|
|
|
|
height: 5px;
|
|
|
|
}
|
|
|
|
&::-webkit-scrollbar-button {
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
&::-webkit-scrollbar-thumb {
|
|
|
|
background: rgba(0,0,0,.25);
|
|
|
|
border: none;
|
|
|
|
border-radius: 50px;
|
|
|
|
}
|
|
|
|
&::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.5); }
|
|
|
|
&::-webkit-scrollbar-thumb:active { background: rgba(0,0,0,.25); }
|
|
|
|
&::-webkit-scrollbar-track {
|
|
|
|
background: rgba(0,0,0,.25);
|
|
|
|
border: none;
|
|
|
|
border-radius: 50px;
|
|
|
|
}
|
|
|
|
&::-webkit-scrollbar-track:hover { background: rgba(0,0,0,.25); }
|
|
|
|
&::-webkit-scrollbar-track:active { background: rgba(0,0,0,.25); }
|
|
|
|
&::-webkit-scrollbar-corner { background: 0 0; }
|
|
|
|
`;
|
|
|
|
|
|
|
|
const VirtualizedScrollboxVertical = styled(List)`
|
|
|
|
overflow-y: auto;
|
|
|
|
background: linear-gradient(white 30%, rgba(255,255,255,0)),
|
|
|
|
linear-gradient(rgba(255,255,255,0), white 70%) 0 100%,
|
|
|
|
/* Shadows */
|
|
|
|
radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.2), rgba(0,0,0,0)),
|
|
|
|
radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%;
|
|
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-color: transparent;
|
|
|
|
background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
|
|
|
|
background-attachment: local, local, scroll, scroll;
|
|
|
|
|
|
|
|
// Fancy scroll
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
width: 5px;
|
|
|
|
height: 5px;
|
|
|
|
}
|
|
|
|
&::-webkit-scrollbar-button {
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
&::-webkit-scrollbar-thumb {
|
|
|
|
background: rgba(0,0,0,.25);
|
|
|
|
border: none;
|
|
|
|
border-radius: 50px;
|
|
|
|
}
|
|
|
|
&::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.5); }
|
|
|
|
&::-webkit-scrollbar-thumb:active { background: rgba(0,0,0,.25); }
|
|
|
|
&::-webkit-scrollbar-track {
|
|
|
|
background: rgba(0,0,0,.25);
|
|
|
|
border: none;
|
|
|
|
border-radius: 50px;
|
|
|
|
}
|
|
|
|
&::-webkit-scrollbar-track:hover { background: rgba(0,0,0,.25); }
|
|
|
|
&::-webkit-scrollbar-track:active { background: rgba(0,0,0,.25); }
|
|
|
|
&::-webkit-scrollbar-corner { background: 0 0; }
|
|
|
|
`;
|
|
|
|
|
2021-11-11 03:10:35 +08:00
|
|
|
const ModalScrollboxVertical = styled(ReactModal)`
|
|
|
|
overflow-y: auto;
|
|
|
|
background: linear-gradient(white 30%, rgba(255,255,255,0)),
|
|
|
|
linear-gradient(rgba(255,255,255,0), white 70%) 0 100%,
|
|
|
|
/* Shadows */
|
|
|
|
radial-gradient(farthest-side at 50% 0, rgba(0,0,0,.2), rgba(0,0,0,0)),
|
|
|
|
radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,.2), rgba(0,0,0,0)) 0 100%;
|
|
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-color: transparent;
|
|
|
|
background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
|
|
|
|
background-attachment: local, local, scroll, scroll;
|
|
|
|
|
|
|
|
// Fancy scroll
|
|
|
|
&::-webkit-scrollbar {
|
|
|
|
width: 5px;
|
|
|
|
height: 5px;
|
|
|
|
}
|
|
|
|
&::-webkit-scrollbar-button {
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
&::-webkit-scrollbar-thumb {
|
|
|
|
background: rgba(0,0,0,.25);
|
|
|
|
border: none;
|
|
|
|
border-radius: 50px;
|
|
|
|
}
|
|
|
|
&::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.5); }
|
|
|
|
&::-webkit-scrollbar-thumb:active { background: rgba(0,0,0,.25); }
|
|
|
|
&::-webkit-scrollbar-track {
|
|
|
|
background: rgba(0,0,0,.25);
|
|
|
|
border: none;
|
|
|
|
border-radius: 50px;
|
|
|
|
}
|
|
|
|
&::-webkit-scrollbar-track:hover { background: rgba(0,0,0,.25); }
|
|
|
|
&::-webkit-scrollbar-track:active { background: rgba(0,0,0,.25); }
|
|
|
|
&::-webkit-scrollbar-corner { background: 0 0; }
|
|
|
|
`;
|
|
|
|
|
2021-10-26 03:21:27 +08:00
|
|
|
export {
|
|
|
|
ScrollboxVertical,
|
|
|
|
VirtualizedScrollboxVertical,
|
2021-11-11 03:10:35 +08:00
|
|
|
ModalScrollboxVertical,
|
2021-10-26 03:21:27 +08:00
|
|
|
};
|