Skip to content

Commit

Permalink
Merge pull request #368 from bomin0830/part2-김보민-week11
Browse files Browse the repository at this point in the history
[김보민] week11
  • Loading branch information
devym-37 authored May 4, 2024
2 parents 28ef86c + 62770e4 commit 4463884
Show file tree
Hide file tree
Showing 57 changed files with 812 additions and 348 deletions.
Binary file modified .DS_Store
Binary file not shown.
8 changes: 4 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react": "^18.3.1",
"react-dom": "^18.2.0",
"react-router-dom": "^6.22.3",
"react-scripts": "5.0.1",
Expand Down
10 changes: 10 additions & 0 deletions public/images/Group 36.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/_close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/images/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions public/images/kebab.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions public/images/pen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions public/images/share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/components/ErrorComponent/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./ErrorComponent";
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/components/FolderInfo/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./FolderInfo";
18 changes: 18 additions & 0 deletions src/components/FolderTitle/FolderTitle.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.folderTitle-wrapper {
display: flex;
justify-content: space-between;
}

.title-button-wrapper {
display: flex;
justify-content: center;
align-items: center;
gap: 12px;
}

.title-button-wrapper p {
display: flex;
justify-content: center;
align-items: center;
gap: 4px;
}
67 changes: 67 additions & 0 deletions src/components/FolderTitle/FolderTitle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import { useState } from "react";
import { ModalLayout } from "../ModalLayout";
import "./FolderTitle.css";

export function FolderTitle({ name }) {
const [isOpen, setIsOpen] = useState({
share: false,
delete: false,
nameChange: false,
});

const toggleHandler = (state) => {
setIsOpen((prev) => ({
...prev,
[state]: !prev[state],
}));
};

console.log(isOpen.share);
return (
<>
<div className="folderTitle-wrapper">
<div className="folder-name">{name}</div>
<div className="title-button-wrapper">
<p onClick={() => toggleHandler("share")}>
<img src="images/share.svg" alt="share-button"></img>공유
</p>
<p onClick={() => toggleHandler("nameChange")}>
<img src="images/pen.svg" alt="nameChange-button"></img>이름 변경
</p>
<p onClick={() => toggleHandler("delete")}>
<img src="images/Group 36.svg" alt="delete-button"></img>삭제
</p>
</div>
</div>
{isOpen.share && (
<ModalLayout
title="폴더 공유"
description={name}
toggleHandler={() => toggleHandler("share")}
>
폴더 공유
</ModalLayout>
)}
{isOpen.delete && (
<ModalLayout
title="폴더 삭제"
description={name}
toggleHandler={() => toggleHandler("delete")}
>
<div className="button delete">삭제하기</div>
</ModalLayout>
)}
{isOpen.nameChange && (
<ModalLayout
title="폴더 이름 변경"
toggleHandler={() => toggleHandler("nameChange")}
>
<div className="modal-contents">
<input></input>
<div className="add button">변경하기</div>
</div>
</ModalLayout>
)}
</>
);
}
1 change: 1 addition & 0 deletions src/components/FolderTitle/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./FolderTitle";
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/components/Footer/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./Footer";
8 changes: 6 additions & 2 deletions src/components/GlobalStyles.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createGlobalStyle } from 'styled-components';
import { createGlobalStyle } from "styled-components";

const GlobalStyles = createGlobalStyle`
html, body, div, span, applet, object, iframe,
Expand Down Expand Up @@ -60,7 +60,11 @@ const GlobalStyles = createGlobalStyle`
border-width: 0;
border-style: none;
border-color: transparent;
}
* {
box-sizing: border-box;
}
}
`;

export default GlobalStyles;
export default GlobalStyles;
20 changes: 0 additions & 20 deletions src/components/Header.js

This file was deleted.

File renamed without changes.
24 changes: 24 additions & 0 deletions src/components/Header/Header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import "./Header.css";

export function Header({ user }) {
return (
<header className="header">
<div className="header-contents">
<a href="/">
<img src="images/logo.svg" alt="linklabrary로고" />
</a>
<div className="user-container">
<div className="icon">
<img src="images/Ellipse21.svg" alt="myicon"></img>
<img
className="profile"
src="images/myprofile.png"
alt="myprofile"
></img>
</div>
<p>{user.email ?? "로그인"}</p>
</div>
</div>
</header>
);
}
1 change: 1 addition & 0 deletions src/components/Header/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./Header";
38 changes: 0 additions & 38 deletions src/components/LinkInput.css

This file was deleted.

17 changes: 0 additions & 17 deletions src/components/LinkInput.js

This file was deleted.

61 changes: 61 additions & 0 deletions src/components/LinkInput/LinkInput.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.LinkInput-wrapper {
padding: 60px 90px;
background-color: #f0f6ff;
}

.LinkInput {
border-radius: 15px;
border: 1px solid var(--Linkbrary-primary-color, #6d6afe);
background-color: white;
width: 800px;
margin: 0 auto;
padding: 16px 20px;
display: flex;
justify-content: space-between;

@media (max-width: 1000px) {
width: 100%;
}
}

.LinkInput .input-icon-wrapper {
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
}

.LinkInput input {
color: #9fa6b2;
font-family: Pretendard;
font-size: 16px;
font-weight: 400;
border-width: 0;
}

.add-url-button {
border-radius: 8px;
background: var(
--gra-purpleblue-to-skyblue,
linear-gradient(91deg, #6d6afe 0.12%, #6ae3fe 101.84%)
);
color: #f5f5f5;
padding: 10px 16px;
font-size: 14px;
}

.modal-contents {
width: 100%;
}

.folder-select-wrapper {
max-height: 172px;
overflow-y: auto;
}

.folder-select {
font-size: 16px;
display: flex;
padding: 8px;
font-weight: 400;
}
Loading

0 comments on commit 4463884

Please sign in to comment.