-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from oduck-team/feature/80
feat: 고객센터 페이지 퍼블리싱
- Loading branch information
Showing
6 changed files
with
348 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>오덕</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<div id="modal-root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> | ||
<title>오덕</title> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
<div id="modal-root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { ComponentProps } from "react"; | ||
|
||
import { Message, TextareaBox, TextareaContainer } from "./style"; | ||
|
||
export interface TextareaProps extends ComponentProps<"textarea"> { | ||
readonly warn?: boolean; | ||
readonly message?: string; | ||
readonly className?: string; | ||
} | ||
|
||
export interface TextareaBoxProps extends ComponentProps<"textarea"> { | ||
readonly warn?: boolean; | ||
} | ||
|
||
export default function Textarea({ | ||
warn = false, | ||
message = "", | ||
style, | ||
className = "", | ||
...rest | ||
}: TextareaProps) { | ||
return ( | ||
<TextareaContainer style={style} className={className}> | ||
<TextareaBox warn={warn} {...rest}></TextareaBox> | ||
{warn && message !== "" && <Message>{message}</Message>} | ||
</TextareaContainer> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { css } from "@emotion/react"; | ||
import styled from "@emotion/styled"; | ||
|
||
import { TextareaBoxProps } from "."; | ||
|
||
export const TextareaBox = styled.textarea<TextareaBoxProps>` | ||
${({ warn = false, theme }) => css` | ||
${theme.typo["body-2-r"]}; | ||
display: flex; | ||
width: 100%; | ||
height: calc(100% - 19px); | ||
padding: 0.5rem 1rem; | ||
justify-content: space-between; | ||
align-items: center; | ||
flex-shrink: 0; | ||
background-color: white; | ||
color: ${theme.colors["neutral"]["50"]}; | ||
border-radius: 6px; | ||
border: 1px solid | ||
${warn ? theme.colors["warn"]["40"] : theme.colors["neutral"]["30"]}; | ||
transition: all 0.2s; | ||
resize: none; | ||
&::placeholder { | ||
color: ${theme.colors["neutral"]["50"]}; | ||
} | ||
&:hover { | ||
${!warn && `border: 1px solid ${theme.colors["primary"]["60"]};`} | ||
} | ||
// pressed | ||
&:focus { | ||
color: ${theme.colors["neutral"]["90"]}; | ||
outline: none; | ||
${!warn && `border: 1px solid ${theme.colors["primary"]["60"]};`} | ||
${!warn && `box-shadow: 0px 0px 2px 0px rgba(17, 124, 255, 0.8);`} | ||
} | ||
`} | ||
`; | ||
|
||
export const Message = styled.div` | ||
${({ theme }) => css` | ||
${theme.typo["micro-r"]}; | ||
color: ${theme.colors["warn"]["40"]}; | ||
width: fit-content; | ||
margin: 4px 0px 0px 8px; | ||
`} | ||
flex-shrink: 0; | ||
`; | ||
|
||
export const TextareaContainer = styled.div` | ||
width: 328px; | ||
height: 138px; | ||
display: flex; | ||
flex-direction: column; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.