-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[조유담] week14 #537
base: part3-조유담
Are you sure you want to change the base?
The head ref may contain hidden characters: "part3-\uC870\uC720\uB2F4-week15"
[조유담] week14 #537
Changes from all commits
e0f3eef
5199505
883a512
a31f229
55879c0
ac4851d
99a7771
34eb7f0
69e3d63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,8 @@ | ||
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). | ||
# React + Vite | ||
|
||
## Getting Started | ||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. | ||
|
||
First, run the development server: | ||
Currently, two official plugins are available: | ||
|
||
```bash | ||
npm run dev | ||
# or | ||
yarn dev | ||
# or | ||
pnpm dev | ||
# or | ||
bun dev | ||
``` | ||
|
||
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
|
||
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. | ||
|
||
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. | ||
|
||
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. | ||
|
||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. | ||
|
||
## Learn More | ||
|
||
To learn more about Next.js, take a look at the following resources: | ||
|
||
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. | ||
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. | ||
|
||
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! | ||
|
||
## Deploy on Vercel | ||
|
||
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. | ||
|
||
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. | ||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh | ||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,39 @@ | ||||||
import { forwardRef, useRef, useState } from "react"; | ||||||
import styles from "./Input.module.css"; | ||||||
import classNames from "classnames/bind"; | ||||||
const cx = classNames.bind(styles); | ||||||
import EyeOffIcon from "@/assets/signin/eye-off.svg?react"; | ||||||
import EyeOnIcon from "@/assets/signin/eye-on.svg?react"; | ||||||
|
||||||
export default forwardRef(function Input( | ||||||
{ type, value, hasError, errorText, ...props }, | ||||||
ref | ||||||
) { | ||||||
const [isOpenIcon, setIsOpenIcon] = useState(false); | ||||||
const [passwordType, setPasswordType] = useState(type); | ||||||
|
||||||
const handleClick = () => { | ||||||
setPasswordType(passwordType === "password" ? "text" : "password"); | ||||||
setIsOpenIcon(isOpenIcon ? false : true); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
}; | ||||||
|
||||||
return ( | ||||||
<> | ||||||
<input | ||||||
ref={ref} | ||||||
value={value} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 제어 컴포넌트/비제어 컴포넌트 개념이 있어요. PR에 남겨둔 에러는 이 값을 defauleValue로 바꾸면 해결될 것 같네요! |
||||||
className={cx("flex-center", "input")} | ||||||
type={passwordType} | ||||||
{...props} | ||||||
/> | ||||||
|
||||||
{type === "password" && ( | ||||||
<button type="button" onClick={handleClick} className={cx("eye-Image")}> | ||||||
{isOpenIcon ? <EyeOnIcon /> : <EyeOffIcon />} | ||||||
</button> | ||||||
)} | ||||||
|
||||||
{hasError && <p className={cx("error")}>{errorText}</p>} | ||||||
</> | ||||||
); | ||||||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.input { | ||
width: 400px; | ||
padding: 18px 15px; | ||
border-radius: 8px; | ||
border: 1px solid var(--linkbrary-gray-20); | ||
background: var(--linkbrary-white); | ||
} | ||
|
||
.error { | ||
color: var(--linkbrary-red); | ||
font-family: Pretendard; | ||
font-size: 14px; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: normal; | ||
} | ||
|
||
.eye-Image { | ||
position: absolute; | ||
top: 18px; | ||
right: 15px; | ||
border: 0; | ||
background-color: transparent; | ||
cursor: pointer; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
html, | ||
body, | ||
div, | ||
span, | ||
applet, | ||
object, | ||
iframe, | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6, | ||
p, | ||
blockquote, | ||
pre, | ||
a, | ||
abbr, | ||
acronym, | ||
address, | ||
big, | ||
cite, | ||
code, | ||
del, | ||
dfn, | ||
em, | ||
img, | ||
ins, | ||
kbd, | ||
q, | ||
s, | ||
samp, | ||
small, | ||
strike, | ||
strong, | ||
sub, | ||
sup, | ||
tt, | ||
var, | ||
b, | ||
u, | ||
i, | ||
center, | ||
dl, | ||
dt, | ||
dd, | ||
ol, | ||
ul, | ||
li, | ||
fieldset, | ||
form, | ||
label, | ||
legend, | ||
table, | ||
caption, | ||
tbody, | ||
tfoot, | ||
thead, | ||
tr, | ||
th, | ||
td, | ||
article, | ||
aside, | ||
canvas, | ||
details, | ||
embed, | ||
figure, | ||
figcaption, | ||
footer, | ||
header, | ||
hgroup, | ||
menu, | ||
nav, | ||
output, | ||
ruby, | ||
section, | ||
summary, | ||
time, | ||
mark, | ||
audio, | ||
video { | ||
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
font-size: 100%; | ||
font: inherit; | ||
vertical-align: baseline; | ||
} | ||
|
||
html, | ||
body, | ||
div, | ||
span, | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6, | ||
p, | ||
pre { | ||
word-break: keep-all; | ||
} | ||
* { | ||
box-sizing: border-box; | ||
} | ||
|
||
/* HTML5 display-role reset for older browsers */ | ||
article, | ||
aside, | ||
details, | ||
figcaption, | ||
figure, | ||
footer, | ||
header, | ||
hgroup, | ||
menu, | ||
nav, | ||
section { | ||
display: block; | ||
} | ||
|
||
body { | ||
line-height: 1; | ||
} | ||
|
||
ol, | ||
ul { | ||
list-style: none; | ||
} | ||
|
||
blockquote, | ||
q { | ||
quotes: none; | ||
} | ||
|
||
blockquote:before, | ||
blockquote:after, | ||
q:before, | ||
q:after { | ||
content: ""; | ||
content: none; | ||
} | ||
|
||
table { | ||
border-collapse: collapse; | ||
border-spacing: 0; | ||
} | ||
|
||
:root { | ||
--linkbrary-bg: #f0f6ff; | ||
--linkbrary-primary-color: #6d6afe; | ||
--black: #000; | ||
--linkbrary-gray-20: #ccd5e3; | ||
--linkbrary-white: #fff; | ||
--gra-purpleblue-to-skyblue: linear-gradient( | ||
91deg, | ||
#6d6afe 0.12%, | ||
#6ae3fe 101.84% | ||
); | ||
--grey-light: #f5f5f5; | ||
--linkbrary-gray-10: #e7effb; | ||
--linkbrary-gray-100: #373740; | ||
--fandom-k-gra-blue-to-pink: linear-gradient( | ||
271deg, | ||
#fe578f -9.84%, | ||
#68e8f9 107.18% | ||
); | ||
--the-julge-black: #111322; | ||
|
||
--linkbrary-red: #ff5b56; | ||
} | ||
|
||
.flex-center { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.cursor-pointer { | ||
cursor: pointer; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta name="description" content="세상의 모든 정보를 쉽게 저장하고 관리해 보세요" /> | ||
<meta property="og:title" content="Linkbrary" /> | ||
<meta property="og:url" content="https://youdame.netlify.app/" /> | ||
<meta property="og:type" content="website" /> | ||
<meta property="og:description" content="세상의 모든 정보를 쉽게 저장하고 관리해 보세요" /> | ||
<meta property="og:image" content="https://youdame.netlify.app/images/landing/img1.png" /> | ||
<link rel="stylesheet" href="/index.css" /> | ||
<title>Linkbrary</title> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
</body> | ||
|
||
</html> |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요고 위치 바꿔주시면 좋겠네요!