Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notification #46

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions frontend/src/components/SwitchDashboard/CheckboxInput.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React from 'react'
import './switch.css';

export default function CheckboxInput() {
return (
<div className="notification-options">
<input className="big-input" type="text" placeholder="Accepted" />
<input className="switch" type="checkbox" />
<input className="big-input" type="text" placeholder="Rejected" />
<input className="switch" type="checkbox" />
<input className="big-input" type="text" placeholder="Funded" />
<input className="switch" type="checkbox" />
</div>
);
}
109 changes: 109 additions & 0 deletions frontend/src/components/SwitchDashboard/switch.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
.big-input {
width: 419px;
height: 66px;
background: #F3F4F5;
border: 1px solid #CFCFCF;
border-radius: 8px;
outline: none;
margin-left: 30px;
}

.big-input::placeholder {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 20px;
color: #4E4E4E;
text-indent: 10px;
}

.switch {
position: relative;
left: -100px;
top: 18px;
z-index: 999;
}

input {
-webkit-appearance: none;
position: relative;
width: 88px;
height: 43.17px;
border-radius: 25px;
background-color: #ccc;
transition: background .3s;
outline: none;
cursor: pointer;
}

input::after {
content: '';
position: absolute;
top: 50%;
left: 30%;
transform: translate(-50%, -50%);
border-radius: 50%;
width: 28.23px;
height: 29.89px;
background-color: rgb(255, 255, 255);
transition: left .3s;
}

input:checked {
background-color: #1570EF;
}

input:checked::after {
left: 75%;
}

@media screen and (min-width: 375px) and (max-width: 412px) {
.big-input {
position: relative;
height: 45px;
width: 315px;
background: #F3F4F5;
border: 1px solid #CFCFCF;
border-radius: 8px;
outline: none;
margin-top: -20px;
margin-bottom: -30px;
}

.return-notification h2 {
font-family: 'Lexend';
font-style: normal;
font-weight: 900;
font-size: 20px;
line-height: 136.02%;
color: #101828;
}

.return-notification span {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 20px;
color: #4E4E4E;
}

.big-input::placeholder {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 20px;
color: #4E4E4E;
text-indent: 10px;
}
.switch {
position: relative;
left: 255px;
top: -26px;
z-index: 999;
width: 80px;
height: 35px;
}
}
11 changes: 8 additions & 3 deletions frontend/src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Pricing from './pages/Pricing';
import PrivacyAndHelp from './pages/PrivacyAndHelp';
import Resources from './pages/Resources';
import UploadAccountsStatementReady from './pages/UploadAccountsStatementReady';
import NotificationsPage from './pages/NotificationsPage/NotificationsPage';
import UploadData from './pages/UploadData';
import UploadedAccountStatementReady from './pages/UploadedAccountStatementReady';
import UpoadingSalesRecord from './pages/UpoadingSalesRecord';
Expand Down Expand Up @@ -118,13 +119,17 @@ const router = createBrowserRouter([
path: '/userupload',
element: <UserUpload />,
},
{
path: '/notification',
element: <NotificationsPage />,
},
]);

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<RouterProvider router={router} />
</React.StrictMode>
<React.StrictMode>
<RouterProvider router={router} />
</React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
Expand Down
33 changes: 33 additions & 0 deletions frontend/src/pages/NotificationsPage/NotificationsPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from 'react'
import CheckboxInput from '../../components/SwitchDashboard/CheckboxInput'

export default function NotificationsPage() {
return (
<div className='notifications-container'>
{/* Returns Notifications */}
<div className="return-notification">
<div className="heading">
<h2>Return Notifications</h2>
<hr />
<span>Notify me when a return is: </span>
</div>
<div className="notify">
<CheckboxInput />
<p>Get real time notification on every return transaction happening in your account by choosing your preferred settings here.</p>
</div>
</div>
{/* Security Notifications */}
<div className="return-notification">
<div className="heading">
<h2>Security Notifications</h2>
<hr />
<span>Notify me when there is a: </span>
</div>
<div className="notify">
<CheckboxInput />
<p>Get real time notification on every return transaction happening in your account by choosing your preferred settings here.</p>
</div>
</div>
</div>
)
}
95 changes: 95 additions & 0 deletions frontend/src/pages/NotificationsPage/notification.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
.notifications-container {
width: 970px;
height: 724px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

.return-notification {
margin: 50px 25px;
}

hr {
width: 860px;
margin: 10px 0 10px 30px;
}

.notify {
display: flex;
gap: 10px;
}

.heading {
margin-bottom: 20px;
}

.heading h2 {
font-family: 'Lexend';
font-style: normal;
font-weight: 700;
font-size: 20px;
line-height: 136.02%;
color: #101828;
margin-left: 30px;
}

.heading span {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 20px;
color: #4E4E4E;
margin-left: 30px;
}

.notify p {
font-family: 'Lexend';
font-style: normal;
font-weight: 500;
font-size: 20px;
line-height: 136.52%;
color: #667085;
}

@media screen and (min-width: 375px) and (max-width: 412px) {
.notifications-container {
max-width: 376px;
margin: 20px -12px;
}
body {
overflow: hidden;
}

hr {
width: 300px;
}

.notify p {
display: none;
}

.heading span {
margin-bottom: 15px;
}

.return-notification h2 {
font-family: 'Lexend';
font-style: normal;
font-weight: 900;
font-size: 20px;
line-height: 136.02%;
color: #101828;
}

.return-notification span {
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-size: 20px;
line-height: 20px;
color: #4E4E4E;
}
}