Skip to content

Commit

Permalink
Nitish login responsive (#92)
Browse files Browse the repository at this point in the history
* made sign up page responsive

* made login page responsive

---------

Co-authored-by: admin1 <[email protected]>
  • Loading branch information
nitish-egov and nitish-egov committed Aug 14, 2023
1 parent 3509e9f commit 53e8b51
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/components/Navbar/signup/FormInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function FormInput({ name, label,inputType, validation }) {
const password = watch("password");

return (
<div className={`${name}-container`}>
<div className="{`${name}-container`} text-center md:text-left">
<label className="form__label" htmlFor={name}>
{label}
</label>
Expand Down
8 changes: 4 additions & 4 deletions src/components/Navbar/signup/SignUpForm.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import React from 'react';
import { useForm, FormProvider } from 'react-hook-form';
import { useNavigate } from 'react-router-dom';
Expand All @@ -14,7 +15,7 @@ function SignUpForm() {
};

return (
<div className="form">
<div className="form ">
<FormProvider {...methods}>
<form onSubmit={methods.handleSubmit(onSubmit)} className="form-body">
<FormInput
Expand Down Expand Up @@ -49,8 +50,8 @@ function SignUpForm() {
validate: (value) => value === methods.watch("password") || "Passwords do not match",
}}
/>
<div className="footer">
<button className="submit btn" type="submit">Submit</button>
<div className="footer flex flex-col md:flex-row md:items-center justify-between">
<button className="submit btn mb-4 md:mb-0 md:mr-4" type="submit">Submit</button>
<button className="login btn" onClick={() => navigate('/')}>Login</button>
</div>
</form>
Expand All @@ -62,4 +63,3 @@ function SignUpForm() {
export default SignUpForm;



10 changes: 5 additions & 5 deletions src/components/Navbar/signup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import './style.css'


function SignUp() {


return (
<div>
<header className="header" style={{ height: "25vh" }}>
<span><h1 className="head">Welcome To Jira App</h1></span>
<span>
<h2 className="head">Sign Up</h2>
<span className="flex flex-col items-center h-full justify-center">
<h1 className="text-2xl font-semibold mb-4">Welcome To Jira App</h1>
<h2 className="text-2xl font-semibold text-blue-500">Sign Up</h2>
</span>


</header>
<SignUpForm />
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/loginpage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ const LoginPage = () => {
};

return (
<div className="login-container">
<div className="login-container flex justify-center items-center h-screen ">
<h1> {language === 'en' ? 'Login to Jira' : 'Connexion à Jira'}</h1>

<FormProvider {...methods}>
<form onSubmit={handleSubmit(onSubmit)}>
<FormInput
<FormInput className = " text-center md:text-left"
name="username"
label={language === 'en' ? 'Username:' : 'Nom d\'utilisateur :'}
validation={{
Expand Down

0 comments on commit 53e8b51

Please sign in to comment.