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
594 changes: 577 additions & 17 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
"preview": "vite preview"
},
"dependencies": {
"@tailwindcss/postcss": "^4.2.1",
"postcss": "^8.5.8",
"react": "^19.2.4",
"react-dom": "^19.2.4"
"react-dom": "^19.2.4",
"tailwindcss": "^4.2.1"
},
"devDependencies": {
"@eslint/js": "^9.39.4",
Expand Down
5 changes: 5 additions & 0 deletions postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
plugins: {
"@tailwindcss/postcss": {},
},
};
1 change: 0 additions & 1 deletion public/favicon.svg

This file was deleted.

24 changes: 0 additions & 24 deletions public/icons.svg

This file was deleted.

131 changes: 17 additions & 114 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,121 +1,24 @@
import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from './assets/vite.svg'
import heroImg from './assets/hero.png'
import './App.css'
import TodoHeader from "./components/TodoHeader";
import TodoList from "./components/TodoList";

function App() {
const [count, setCount] = useState(0)
const title = "오늘의 할 일";

return (
<>
<section id="center">
<div className="hero">
<img src={heroImg} className="base" width="170" height="179" alt="" />
<img src={reactLogo} className="framework" alt="React logo" />
<img src={viteLogo} className="vite" alt="Vite logo" />
</div>
<div>
<h1>Get started</h1>
<p>
Edit <code>src/App.tsx</code> and save to test <code>HMR</code>
</p>
</div>
<button
className="counter"
onClick={() => setCount((count) => count + 1)}
>
Count is {count}
</button>
</section>

<div className="ticks"></div>
const todo1 = "리액트 공식문서 읽기";
const todo2 = "알고리즘 문제 풀기";
const todo3 = "운동 30분 하기";
const todo4 = "프로젝트 회의 준비";

<section id="next-steps">
<div id="docs">
<svg className="icon" role="presentation" aria-hidden="true">
<use href="/icons.svg#documentation-icon"></use>
</svg>
<h2>Documentation</h2>
<p>Your questions, answered</p>
<ul>
<li>
<a href="https://vite.dev/" target="_blank">
<img className="logo" src={viteLogo} alt="" />
Explore Vite
</a>
</li>
<li>
<a href="https://react.dev/" target="_blank">
<img className="button-icon" src={reactLogo} alt="" />
Learn more
</a>
</li>
</ul>
</div>
<div id="social">
<svg className="icon" role="presentation" aria-hidden="true">
<use href="/icons.svg#social-icon"></use>
</svg>
<h2>Connect with us</h2>
<p>Join the Vite community</p>
<ul>
<li>
<a href="https://github.com/vitejs/vite" target="_blank">
<svg
className="button-icon"
role="presentation"
aria-hidden="true"
>
<use href="/icons.svg#github-icon"></use>
</svg>
GitHub
</a>
</li>
<li>
<a href="https://chat.vite.dev/" target="_blank">
<svg
className="button-icon"
role="presentation"
aria-hidden="true"
>
<use href="/icons.svg#discord-icon"></use>
</svg>
Discord
</a>
</li>
<li>
<a href="https://x.com/vite_js" target="_blank">
<svg
className="button-icon"
role="presentation"
aria-hidden="true"
>
<use href="/icons.svg#x-icon"></use>
</svg>
X.com
</a>
</li>
<li>
<a href="https://bsky.app/profile/vite.dev" target="_blank">
<svg
className="button-icon"
role="presentation"
aria-hidden="true"
>
<use href="/icons.svg#bluesky-icon"></use>
</svg>
Bluesky
</a>
</li>
</ul>
</div>
</section>
const icon = "✅";

<div className="ticks"></div>
<section id="spacer"></section>
</>
)
return (
<div className="min-h-screen bg-neutral-100 p-10">
<div className="w-[640px] inline-flex flex-col justify-start items-start gap-5">
<TodoHeader icon={icon} title={title} />
<TodoList todo1={todo1} todo2={todo2} todo3={todo3} todo4={todo4} />
</div>
</div>
);
}

export default App
export default App;
20 changes: 20 additions & 0 deletions src/components/TodoCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
type TodoCardProps = {
text: string;
isLast?: boolean;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isLast prop이 정의되어 있지만 현재 TodoList에서 전달되지 않고 있어서 사실상 사용되지 않는 상태입니다. 혹시 isLast가 구체적으로 하는 역할이 있을까요? 만약 필요하지 않다면 제거하고, 필요하다면 실제 사용되는 흐름까지 연결해두면 컴포넌트 책임이 더 명확해질 것 같아요.

};

function TodoCard({ text, isLast }: TodoCardProps) {
return (
<div
className={
isLast
? "self-stretch flex-1 p-4 bg-white rounded-xl shadow-[0px_1px_3px_0px_rgba(0,0,0,0.10)] inline-flex justify-start items-center gap-2.5"
: "self-stretch p-4 bg-white rounded-xl shadow-[0px_1px_3px_0px_rgba(0,0,0,0.10)] inline-flex justify-start items-center gap-2.5"
}
>
<div className="text-gray-800 text-sm font-normal leading-5">{text}</div>
</div>
);
}

export default TodoCard;
Loading