Skip to content

Commit

Permalink
[FEATURE]: added settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinmay9281 committed Oct 19, 2024
1 parent af24ece commit fd51be3
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 1 deletion.
47 changes: 46 additions & 1 deletion src/pages/Settings/Settings.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
import { useNavigate } from "react-router-dom";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faClose, faSave } from "@fortawesome/free-solid-svg-icons";
import styles from "./settings.module.scss";

const Settings = () => {
return <div>Settings</div>;
const navigate = useNavigate();

const closeSettingPage = () => {
navigate("/");
};

const getHeaderDom = () => {
return (
<div className={styles.headerWrapper}>
<div className={styles.header}>
<p className={styles.headerText}>Settings</p>
<FontAwesomeIcon
icon={faClose}
size="2xl"
className={styles.closeIcon}
onClick={closeSettingPage}
/>
</div>
</div>
);
};

const getFooterDom = () => {
return (
<div className={styles.footer}>
<button className={styles.saveBtn}>
<FontAwesomeIcon icon={faSave} />
<span className={styles.saveBtnText}>Save</span>
</button>
</div>
);
};

return (
<div className={styles.mainWrapper}>
<div className={styles.settings}>
{getHeaderDom()}
{getFooterDom()}
</div>
</div>
);
};

export default Settings;
53 changes: 53 additions & 0 deletions src/pages/Settings/settings.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@import "/src/styles/variables.scss";
@import "/src/styles/mixins.scss";

.mainWrapper {
height: 100%;
padding: 20px 0;
.settings {
@include font-poppins;
color: $clockColor;
width: 70%;
margin: auto;
padding: 40px;
display: flex;
flex-direction: column;
height: 100%;

.headerWrapper {
flex: 1;

.header {
display: flex;
justify-content: space-between;
align-items: center;

.headerText {
font-size: 46px;
font-weight: 800;
}
.closeIcon {
cursor: pointer;
}
}
}
.footer {
display: flex;
justify-content: flex-end;

.saveBtn {
display: flex;
gap: 6px;
align-items: center;
background-color: $clockColor;
padding: 16px;
border-radius: 6px;
cursor: pointer;

.saveBtnText {
font-weight: 600;
}
}
}
}
}

0 comments on commit fd51be3

Please sign in to comment.