Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | import React from 'react';
import { css } from '@emotion/react';
import { ScrollScreen as ScrollScreenModel } from '@uniquegood/realworld-web-interface/lib/models/game/Screen/Scroll';
import PageComponent from '@lib/components/Game/Screen/FreeForm/Page';
export default function ScrollScreen({ page, style }: ScrollScreenModel) {
const containerStyle = React.useMemo(() => {
let temp = `
background-color: ${style.backgroundColor};
`;
if (style.backgroundImageUrl) {
temp += `
background-image: url(${style.backgroundImageUrl});
background-size: cover;
background-position: center;
`;
}
return css(temp);
}, [style]);
return (
<div css={[screenContainer, containerStyle, noScrollbar]}>
<PageComponent {...page} />
</div>
);
}
const screenContainer = css`
width: 100%;
min-height: 100%;
height: 100%;
overflow-y: scroll;
overflow-x: hidden;
`;
const customScrollbarStyles = css`
scrollbar-width: thin;
scrollbar-color: rgba(34, 34, 34, 0.15) transparent;
::-webkit-scrollbar {
width: 12px;
height: 12px;
}
::-webkit-scrollbar-thumb {
outline: none;
border-radius: 10px;
border: 4px solid transparent;
box-shadow: inset 6px 6px 0 rgba(34, 34, 34, 0.15);
}
::-webkit-scrollbar-thumb:hover {
border: 4px solid transparent;
box-shadow: inset 6px 6px 0 rgba(34, 34, 34, 0.25);
}
::-webkit-scrollbar-track {
box-shadow: none;
background-color: transparent;
}
`;
const noScrollbar = css`
::-webkit-scrollbar {
width: 0; /* 스크롤바 너비를 0으로 설정 */
}
::-webkit-scrollbar-thumb {
background-color: transparent; /* 스크롤바 색상을 투명하게 설정 */
}
`;
|