Commit 1d1194ff authored by Kim, Subin's avatar Kim, Subin
Browse files

Buttons import 및 스타일 변경

parent 6119ea8f
import { useHistory } from "react-router-dom";
import styles from "./buttons.module.scss";
const BackBtn = () => {
const history = useHistory();
return (
<button className={`btn btn-outline-crimson position-absolute border-0 shadow-none p-0 ${styles.backBtn}`} onClick={() => history.goBack()}>
<i className={`bi bi-arrow-left-square ${styles.icon}`}></i>
</button>
)
}
export default BackBtn
\ No newline at end of file
import { Link } from "react-router-dom";
import styles from "./editBtn.module.scss";
import styles from "./buttons.module.scss";
const EditBtn = ({ pathname }) => {
return (
<Link className={`btn btn-crimson position-absolute ${styles.editBtn}`} to={"/" + pathname}>
<i className="bi bi-plus-circle"></i>
<Link className={`position-absolute ${styles.editBtn}`} to={"/" + pathname}>
<i className={`bi bi-plus-circle ${styles.icon}`}></i>
</Link>
)
}
......
import { Link } from "react-router-dom";
import styles from "./buttons.module.scss";
const HomeBtn = () => {
return (
<Link className={`btn btn-outline-crimson position-absolute ${styles.homeBtn}`} to="/home">
<i className={`bi bi-house-door-fill fs-4 ${styles.icon}`}></i>
</Link>
)
}
export default HomeBtn
\ No newline at end of file
.homeBtn {
top: 10px;
right: 10px;
& .icon {
color: crimson;
&:hover, :active {
color: #fff;
}
}
}
.editBtn {
bottom: 10px;
right: 10px;
& .icon {
color: crimson;
font-size: 2.5em;
}
}
.backBtn {
top: 4px;
right: 10px;
& .icon {
font-size: 2.3em;
}
&:hover, &:visited {
background-color: #fff;
& .icon {
color: crimson;
}
}
}
\ No newline at end of file
.editBtn {
font-size: 24px;
bottom: 10px;
right: 10px;
border-radius: 35px;
}
\ No newline at end of file
import Menu from "../components/Menu/Menu.js";
import EditBtn from "../components/EditBtn/EditBtn.js";
import EditBtn from "../components/Buttons/EditBtn.js";
const HomePage = () => {
return (
......
import Menu from "../components/Menu/Menu.js";
import HomeBtn from "../components/Buttons/HomeBtn.js";
const SchedulePage = () => {
return (
<></>
<>
<Menu />
<HomeBtn />
</>
)
}
......
import Menu from "../components/Menu/Menu.js";
import HomeBtn from "../components/Buttons/HomeBtn.js";
const StudyPlanListPage = () => {
return (
<></>
<>
<Menu />
<HomeBtn />
</>
)
}
......
import Menu from "../components/Menu/Menu.js";
import BackBtn from "../components/Buttons/BackBtn.js";
import EditBtn from "../components/Buttons/EditBtn.js";
const StudyPlanPage = () => {
return (
<></>
<>
<Menu />
<BackBtn />
<EditBtn pathname="studyplan/edit" />
</>
)
}
......
import Menu from "../components/Menu/Menu.js";
import HomeBtn from "../components/Buttons/HomeBtn.js";
const ToDoPage = () => {
return (
<></>
<>
<Menu />
<HomeBtn />
</>
)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment