Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion src/app/planet/add/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const PlanetAddPage = () => {
</Column>
<Label>원하는 행성의 종류를 선택해주세요 *</Label>
<PlanetWrapper>
<Image
<PlanetImage
src={`/assets/images/planet/planet${templateType}.png`}
width={200}
height={200}
Expand Down Expand Up @@ -125,6 +125,21 @@ const PlanetWrapper = styled.div`
justify-content: center;
`;

const PlanetImage = styled(Image)`
touch-action: none;
pointer-events: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
-webkit-user-drag: none;
-khtml-user-drag: none;
-moz-user-drag: none;
-o-user-drag: none;
-webkit-touch-callout: none;
`;

const ButtonWrapper = styled.div`
width: 100%;
position: absolute;
Expand Down
10 changes: 5 additions & 5 deletions src/components/common/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,12 @@ const sharedStyles = `
border-radius: 8px;
background: ${theme.colors.gray800};
color: ${theme.colors.white};
${(props: any) => props.theme.fonts.body08};
${(props: any) => props.theme.fonts.body07};
font-family: "Pretendard";

&::placeholder {
color: ${theme.colors.gray500};
${(props: any) => props.theme.fonts.body09};
${(props: any) => props.theme.fonts.body07};
}

&:disabled {
Expand Down Expand Up @@ -173,11 +174,10 @@ const StyledTextarea = styled.textarea<{
}>`
${sharedStyles}
height: ${({ $height }) => $height};
font-family: "Pretendard";
${(props: any) => props.theme.fonts.medium14};
${(props: any) => props.theme.fonts.body07};

&::placeholder {
${(props: any) => props.theme.fonts.regular14};
${(props: any) => props.theme.fonts.body07};
letter-spacing: 1px;
}

Expand Down
11 changes: 10 additions & 1 deletion src/components/common/Planet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ const Planet = (props: PlanetProps) => {
setConfirmDeleteModal(false);
};

// 컴포넌트에서 이미지 컨텍스트 메뉴 방지
const handleContextMenu = (e: React.MouseEvent<HTMLImageElement>) => {
e.preventDefault();
};

return (
<Container>
<PlanetImage
Expand All @@ -118,6 +123,7 @@ const Planet = (props: PlanetProps) => {
height={400}
alt="planet"
priority
onContextMenu={handleContextMenu}
/>
{/* <Shadow /> */}
{orbits &&
Expand Down Expand Up @@ -209,7 +215,9 @@ const PlanetImage = styled(Image)`
left: 50%;
transform: translate(-50%, -50%);
z-index: 5;
//드래그방지

touch-action: none;
pointer-events: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
Expand All @@ -219,6 +227,7 @@ const PlanetImage = styled(Image)`
-khtml-user-drag: none;
-moz-user-drag: none;
-o-user-drag: none;
-webkit-touch-callout: none;
`;

const Shadow = styled.div`
Expand Down
11 changes: 10 additions & 1 deletion src/components/common/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ const Tag = (props: TagProps) => {
/>
)}
{tagType === "planet" && (
<Image
<IconImage
src={renderIcon()}
width={24}
height={24}
Expand Down Expand Up @@ -477,3 +477,12 @@ const DeleteIcon = styled(Image)`
top: -4px;
right: -2px;
`;

const IconImage = styled(Image)`
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
-webkit-touch-callout: none;
`;
2 changes: 2 additions & 0 deletions src/styles/GlobalStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ input, textarea {
border: none;
outline: none;
resize: none;

font-size: 16px;
}

@font-face {
Expand Down