-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from CMP26Projects/auth-forntend
Auth forntend
- Loading branch information
Showing
12 changed files
with
324 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.input { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 0.5rem; | ||
color: var(--grey-100); | ||
font-size: 1rem; | ||
direction: rtl; | ||
width: 100%; | ||
|
||
.radio-buttons { | ||
display: flex; | ||
flex-direction: row; | ||
gap: 0.5rem; | ||
width: 100%; | ||
margin: 0.5rem 0; | ||
} | ||
|
||
input[type="text"], | ||
input[type="password"], | ||
input[type="email"], | ||
input[type="number"], | ||
input[type="tel"], | ||
input[type="date"], | ||
input[type="time"] { | ||
width: 100%; | ||
outline: none; | ||
border-radius: 4px; | ||
border: 1px solid var(--grey-600, #4b5563); | ||
background: var(--grey-700, #374151); | ||
padding: 0 4px; | ||
line-height: 1rem; | ||
color: var(--grey-100); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import "./../../assets/styles/components/Inputs.scss"; | ||
|
||
import PropTypes from "prop-types"; | ||
|
||
function TextInput({ | ||
label, | ||
type, | ||
name, | ||
value, | ||
onChange, | ||
placeholder, | ||
required, | ||
}) { | ||
return ( | ||
<label className="input input--text"> | ||
{label} | ||
<input | ||
type={type} | ||
name={name} | ||
placeholder={placeholder} | ||
value={value} | ||
onChange={onChange} | ||
required={required} | ||
/> | ||
</label> | ||
); | ||
} | ||
TextInput.propTypes = { | ||
label: PropTypes.string.isRequired, | ||
type: PropTypes.string, | ||
name: PropTypes.string, | ||
value: PropTypes.string, | ||
onChange: PropTypes.func, | ||
placeholder: PropTypes.string, | ||
required: PropTypes.bool, | ||
}; | ||
function RadioInput({ label, name, required, valuesArr, onChange }) { | ||
return ( | ||
<label className="input input--radio"> | ||
{label} | ||
<div className="radio-buttons"> | ||
{valuesArr.map((value) => ( | ||
<div key={value}> | ||
<input | ||
type="radio" | ||
name={name} | ||
value={value} | ||
onChange={onChange} | ||
required={required} | ||
/> | ||
<span>{value}</span> | ||
</div> | ||
))} | ||
</div> | ||
</label> | ||
); | ||
} | ||
RadioInput.propTypes = { | ||
label: PropTypes.string.isRequired, | ||
name: PropTypes.string, | ||
valuesArr: PropTypes.array, | ||
onChange: PropTypes.func, | ||
required: PropTypes.bool, | ||
}; | ||
|
||
export { RadioInput }; | ||
export default TextInput; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Outlet } from "react-router-dom"; | ||
|
||
import Nav from "../common/nav"; | ||
import Footer from "../common/Footer"; | ||
|
||
export default function PublicLayout() { | ||
return ( | ||
<div className="public_layout"> | ||
<Nav showIcons={false} /> | ||
<Outlet /> | ||
<Footer /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
import './logIn.scss' | ||
import Footer from '../common/Footer' | ||
import Button from "../common/Button"; | ||
import "./logIn.scss"; | ||
|
||
export default function LogIn() { | ||
return ( | ||
<> | ||
<div className="hero"> | ||
<h2>تسجيل الدخول</h2> | ||
<div className="card"> | ||
<label className="input-field"> | ||
الحساب | ||
<input type="email" /> | ||
</label> | ||
<label className="input-field"> | ||
الرمز السري | ||
<input type="password" /> | ||
</label> | ||
<button>تسجيل الدخول</button> | ||
</div> | ||
<div className="small no-account">ليس لديك حساب؟</div> | ||
</div> | ||
<Footer /> | ||
</> | ||
) | ||
return ( | ||
<div className="login"> | ||
<div className="hero"> | ||
<h2>تسجيل الدخول</h2> | ||
<div className="card"> | ||
<label className="input-field"> | ||
الحساب | ||
<input type="email" /> | ||
</label> | ||
<label className="input-field"> | ||
الرمز السري | ||
<input type="password" /> | ||
</label> | ||
<Button className="Button--medium Button--success" linkTo="/signUp"> | ||
تسجيل الدخول | ||
</Button> | ||
</div> | ||
<div className="small no-account">ليس لديك حساب؟</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.