Merge pull request #2 from TeamBNBN/fe/sidebar

[Front-End] feat: 사이드바 추가
This commit is contained in:
mauercho 2024-07-15 10:25:34 +09:00 committed by GitHub
commit f3cac4ac25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 85 additions and 0 deletions

View File

@ -0,0 +1,5 @@
import styles from './SideBar.module.css';
export default function SideBar({ children }) {
return <aside className={styles.sidebar}>{children}</aside>;
}

View 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;
}
}

View 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>
);
}

View 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;
}

View 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>
);
}

View 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;
}

View File

@ -0,0 +1,5 @@
import styles from './SideTitle.module.css';
export default function SideTitle({ children }) {
return <div className={styles.title}>{children}</div>;
}

View File

@ -0,0 +1,7 @@
.title {
width: 100%;
color: var(--text-color);
font-size: 24px;
line-height: 1.2;
font-weight: 700;
}

View 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';