Merge pull request #2 from TeamBNBN/fe/sidebar
[Front-End] feat: 사이드바 추가
This commit is contained in:
commit
f3cac4ac25
5
frontend/src/components/SideBar/SideBar.jsx
Normal file
5
frontend/src/components/SideBar/SideBar.jsx
Normal file
@ -0,0 +1,5 @@
|
||||
import styles from './SideBar.module.css';
|
||||
|
||||
export default function SideBar({ children }) {
|
||||
return <aside className={styles.sidebar}>{children}</aside>;
|
||||
}
|
15
frontend/src/components/SideBar/SideBar.module.css
Normal file
15
frontend/src/components/SideBar/SideBar.module.css
Normal file
@ -0,0 +1,15 @@
|
||||
.sidebar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
width: 320px;
|
||||
|
||||
& > ul {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
10
frontend/src/components/SideBar/SideItem.jsx
Normal file
10
frontend/src/components/SideBar/SideItem.jsx
Normal file
@ -0,0 +1,10 @@
|
||||
import styles from './SideItem.module.css';
|
||||
|
||||
export default function SideItem({ name, sub }) {
|
||||
return (
|
||||
<li className={styles.item}>
|
||||
<div>{name}</div>
|
||||
<div className={styles.sub}>{sub}</div>
|
||||
</li>
|
||||
);
|
||||
}
|
16
frontend/src/components/SideBar/SideItem.module.css
Normal file
16
frontend/src/components/SideBar/SideItem.module.css
Normal file
@ -0,0 +1,16 @@
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
text-decoration: none;
|
||||
color: var(--text-color);
|
||||
font-size: 20px;
|
||||
line-height: 1.2;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.sub {
|
||||
color: var(--text-color-secondary);
|
||||
font-size: 16px;
|
||||
line-height: 1.4;
|
||||
}
|
15
frontend/src/components/SideBar/SideLink.jsx
Normal file
15
frontend/src/components/SideBar/SideLink.jsx
Normal file
@ -0,0 +1,15 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
import styles from './SideLink.module.css';
|
||||
|
||||
export default function SideLink({ children, path }) {
|
||||
return (
|
||||
<li>
|
||||
<Link
|
||||
to={path}
|
||||
className={styles.link}
|
||||
>
|
||||
{children}
|
||||
</Link>
|
||||
</li>
|
||||
);
|
||||
}
|
8
frontend/src/components/SideBar/SideLink.module.css
Normal file
8
frontend/src/components/SideBar/SideLink.module.css
Normal file
@ -0,0 +1,8 @@
|
||||
.link {
|
||||
width: 100%;
|
||||
text-decoration: none;
|
||||
color: var(--text-color);
|
||||
font-size: 20px;
|
||||
line-height: 1.2;
|
||||
font-weight: 400;
|
||||
}
|
5
frontend/src/components/SideBar/SideTitle.jsx
Normal file
5
frontend/src/components/SideBar/SideTitle.jsx
Normal file
@ -0,0 +1,5 @@
|
||||
import styles from './SideTitle.module.css';
|
||||
|
||||
export default function SideTitle({ children }) {
|
||||
return <div className={styles.title}>{children}</div>;
|
||||
}
|
7
frontend/src/components/SideBar/SideTitle.module.css
Normal file
7
frontend/src/components/SideBar/SideTitle.module.css
Normal file
@ -0,0 +1,7 @@
|
||||
.title {
|
||||
width: 100%;
|
||||
color: var(--text-color);
|
||||
font-size: 24px;
|
||||
line-height: 1.2;
|
||||
font-weight: 700;
|
||||
}
|
4
frontend/src/components/SideBar/index.js
Normal file
4
frontend/src/components/SideBar/index.js
Normal file
@ -0,0 +1,4 @@
|
||||
export { default as SideBar } from './SideBar';
|
||||
export { default as SideItem } from './SideItem';
|
||||
export { default as SideLink } from './SideLink';
|
||||
export { default as SideTitle } from './SideTitle';
|
Loading…
Reference in New Issue
Block a user