Skip to content

Commit

Permalink
feat: [#76] flag list, note list 추가, type, defaultProps 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
onlinekkabchi committed Mar 25, 2023
1 parent 38d9292 commit ed7eb50
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 11 deletions.
5 changes: 3 additions & 2 deletions FE/front/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"dev": "vite --host 0.0.0.0 --port 4000",
"build": "tsc && vite build",
"preview": "vite preview"
"preview": "vite preview",
"style": "sass --watch ./src/styles/style.scss ./src/styles/style.css"
},
"dependencies": {
"react": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions FE/front/src/App.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#root {
/* #root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
} */

.logo {
height: 6em;
Expand Down
8 changes: 5 additions & 3 deletions FE/front/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import "./App.css";
import "./styles/style.css";
import Header from "./component/Header";
import Home from "./component/Home";

function App() {
return (
<div className="App">
<p>app</p>
<>
<Header />
<Home />
</div>
</>
);
}

Expand Down
11 changes: 11 additions & 0 deletions FE/front/src/component/FlagList.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
type FlagListProps = {
name: string;
};

FlagList.defaultProps = {
name: "",
};

function FlagList({ name }: FlagListProps) {
return <></>;
}
15 changes: 15 additions & 0 deletions FE/front/src/component/Flags.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
type FlagProps = {
name: string;
};

Flag.defaultProps = {
name: "",
};

function Flag({ name }: FlagProps) {
return <li>{name}</li>;
}

export default function Flags() {
return <ul>flags</ul>;
}
20 changes: 20 additions & 0 deletions FE/front/src/component/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Flags from "./Flags";

type HeaderProps = {
name: string;
};

Header.defaultProps = {
name: "",
};

function Header({ name }: HeaderProps) {
return (
<header>
header
<Flags />
</header>
);
}

export default Header;
8 changes: 4 additions & 4 deletions FE/front/src/component/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ type HomeProps = {
name: string;
};

function Home({ name }: HomeProps) {
return <div>Hello, {name}</div>;
}

Home.defaultProps = {
name: "",
};

function Home({ name }: HomeProps) {
return <main>Hello, {name}</main>;
}

export default Home;
11 changes: 11 additions & 0 deletions FE/front/src/component/NoteList.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
type NoteListProps = {
name: string;
};

NoteList.defaultProps = {
name: "",
};

function NoteList({ name }: NoteListProps) {
return <></>;
}
20 changes: 20 additions & 0 deletions FE/front/src/styles/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions FE/front/src/styles/style.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions FE/front/src/styles/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#root {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
body {
background-color: #fffdee;
}
header {
background-color: blanchedalmond;
}
main {
background-color: brown;
}

0 comments on commit ed7eb50

Please sign in to comment.