Register Page UI
This commit is contained in:
1 parent
a1f5f93d08
commit
e52fc493cc
11 files changed
+284
-14
No files matched your search
@@ -0,0 +1,15 @@
|
|||||||
|
import "./check.css";
|
||||||
|
import React from "react";
|
||||||
|
import CheckGrey from "../../assets/Images/Check-icon-grey.png";
|
||||||
|
|
||||||
|
const Check = ({ text }) => {
|
||||||
|
return (
|
||||||
|
<div className="check">
|
||||||
|
<img className="check-icon" src={CheckGrey} alt="un-checked" />
|
||||||
|
<div className="check-h-spacing" />
|
||||||
|
<label className="check-label">{text}</label>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Check;
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
.check {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-icon {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-h-spacing {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-label {
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #475467;
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
.checkbox-label {
|
.checkbox-label {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
color: #344054;
|
color: #344054;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { useTheme } from "@mui/material";
|
|||||||
*/
|
*/
|
||||||
const EmailTextField = ({
|
const EmailTextField = ({
|
||||||
id,
|
id,
|
||||||
label,
|
label = "Email",
|
||||||
variant,
|
variant,
|
||||||
placeholder,
|
placeholder,
|
||||||
icon,
|
icon,
|
||||||
@@ -41,13 +41,12 @@ const EmailTextField = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ fontFamily: fontFamily }}>
|
<div style={{ fontFamily: fontFamily }}>
|
||||||
<div className="email-text-field-title">Email</div>
|
<div className="email-text-field-title">{label}</div>
|
||||||
<div className="email-text-field">
|
<div className="email-text-field">
|
||||||
<TextField
|
<TextField
|
||||||
error={error}
|
error={error}
|
||||||
className="email-text-field-input"
|
className="email-text-field-input"
|
||||||
id={id}
|
id={id}
|
||||||
label={label}
|
|
||||||
variant={variant}
|
variant={variant}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { useTheme } from "@mui/material";
|
|||||||
*/
|
*/
|
||||||
const PasswordTextField = ({
|
const PasswordTextField = ({
|
||||||
id,
|
id,
|
||||||
label,
|
label = "Password",
|
||||||
variant,
|
variant,
|
||||||
placeholder,
|
placeholder,
|
||||||
icon,
|
icon,
|
||||||
@@ -41,14 +41,13 @@ const PasswordTextField = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{ fontFamily: fontFamily }}>
|
<div style={{ fontFamily: fontFamily }}>
|
||||||
<div className="password-text-field-title">Password</div>
|
<div className="password-text-field-title">{label}</div>
|
||||||
<div className="password-text-field">
|
<div className="password-text-field">
|
||||||
<TextField
|
<TextField
|
||||||
type="password"
|
type="password"
|
||||||
error={error}
|
error={error}
|
||||||
className="password-text-field-input"
|
className="password-text-field-input"
|
||||||
id={id}
|
id={id}
|
||||||
label={label}
|
|
||||||
variant={variant}
|
variant={variant}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
InputProps={{
|
InputProps={{
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
import "./textField.css";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { InputAdornment, TextField } from "@mui/material";
|
||||||
|
import ErrorOutlineIcon from "@mui/icons-material/ErrorOutline";
|
||||||
|
import HelpOutlineIcon from "@mui/icons-material/HelpOutline";
|
||||||
|
import { useTheme } from "@mui/material";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Object} props - The component props.
|
||||||
|
* @param {string} props.id - The ID of the text field.
|
||||||
|
* @param {string} props.label - The label text for the text field.
|
||||||
|
* @param {string} props.variant - The variant of the text field.
|
||||||
|
* @param {string} props.placeholder - The placeholder text for the text field.
|
||||||
|
* @param {ReactNode} props.icon - The icon to display in the text field.
|
||||||
|
* @param {string} props.helperText - The helper text for the text field.
|
||||||
|
* @param {boolean} props.error - Whether the text field has an error.
|
||||||
|
* @returns {JSX.Element} The rendered component.
|
||||||
|
*/
|
||||||
|
const StringTextField = ({
|
||||||
|
id,
|
||||||
|
label,
|
||||||
|
variant,
|
||||||
|
placeholder,
|
||||||
|
icon,
|
||||||
|
helperText,
|
||||||
|
error,
|
||||||
|
}) => {
|
||||||
|
const theme = useTheme();
|
||||||
|
|
||||||
|
const fontLookup = {
|
||||||
|
default: theme.font.default.font,
|
||||||
|
};
|
||||||
|
|
||||||
|
const fontFamily = fontLookup["default"];
|
||||||
|
|
||||||
|
const [showIcon, setShowIcon] = useState(false);
|
||||||
|
|
||||||
|
const handleMouseEnter = () => setShowIcon(true);
|
||||||
|
const handleMouseLeave = () => setShowIcon(false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div style={{ fontFamily: fontFamily }}>
|
||||||
|
<div className="email-text-field-title">{label}</div>
|
||||||
|
<div className="email-text-field">
|
||||||
|
<TextField
|
||||||
|
error={error}
|
||||||
|
className="email-text-field-input"
|
||||||
|
id={id}
|
||||||
|
variant={variant}
|
||||||
|
placeholder={placeholder}
|
||||||
|
InputProps={{
|
||||||
|
endAdornment: (
|
||||||
|
<InputAdornment position="end">
|
||||||
|
<div className="icon-holder">
|
||||||
|
{error && showIcon && (
|
||||||
|
<ErrorOutlineIcon
|
||||||
|
className="text-field-icon"
|
||||||
|
style={{ fill: "red", width: "16px", height: "16px" }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{error && !showIcon && (
|
||||||
|
<ErrorOutlineIcon
|
||||||
|
className="text-field-icon"
|
||||||
|
style={{ fill: "red", width: "16px", height: "16px" }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{!error && showIcon && (
|
||||||
|
<HelpOutlineIcon
|
||||||
|
className="text-field-icon"
|
||||||
|
style={{ width: "16px", height: "16px" }}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</InputAdornment>
|
||||||
|
),
|
||||||
|
}}
|
||||||
|
helperText={helperText}
|
||||||
|
onMouseEnter={handleMouseEnter}
|
||||||
|
onMouseLeave={handleMouseLeave}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default StringTextField;
|
||||||
Whitespace-only changes.
@@ -63,6 +63,7 @@
|
|||||||
color: #1570ef;
|
color: #1570ef;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.google-enter {
|
.google-enter {
|
||||||
|
|||||||
@@ -1 +1,76 @@
|
|||||||
/*REgister styles*/
|
:root {
|
||||||
|
--dimension-width-1: 100vw;
|
||||||
|
--dimension-width-2: 360px;
|
||||||
|
|
||||||
|
--dimension-height-1: 100vh;
|
||||||
|
|
||||||
|
--spacing-small: 12px;
|
||||||
|
--spacing-medium: 24px;
|
||||||
|
--spacing-large: 40px;
|
||||||
|
|
||||||
|
--font-size-small: 13px;
|
||||||
|
--font-size-medium: 16px;
|
||||||
|
|
||||||
|
--register-form-heading-color-1: #101828;
|
||||||
|
--register-form-subheading-color-1: #475467;
|
||||||
|
}
|
||||||
|
|
||||||
|
.register-page {
|
||||||
|
width: var(--dimension-width-1);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
min-height: var(--dimension-height-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.register-form {
|
||||||
|
width: var(--dimension-width-2);
|
||||||
|
margin: 140px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.register-form-header {
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.register-form-header-logo {
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.register-form-v-spacing-24px {
|
||||||
|
height: var(--spacing-medium);
|
||||||
|
}
|
||||||
|
|
||||||
|
.register-form-v-spacing-12px {
|
||||||
|
height: var(--spacing-small);
|
||||||
|
}
|
||||||
|
|
||||||
|
.register-form-v-spacing-40px {
|
||||||
|
height: var(--spacing-large);
|
||||||
|
}
|
||||||
|
|
||||||
|
.register-form-heading {
|
||||||
|
font-size: var(--spacing-medium);
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--register-form-heading-color-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.register-form-subheading {
|
||||||
|
font-size: var(--spacing-small);
|
||||||
|
color: var(--register-form-subheading-color-1);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
#register-firstname-input,
|
||||||
|
#register-lastname-input,
|
||||||
|
#register-email-input,
|
||||||
|
#register-password-input {
|
||||||
|
font-size: var(--spacing-small);
|
||||||
|
width: 294px;
|
||||||
|
height: 11px;
|
||||||
|
padding: 12px 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.register-bottom-spacing {
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
@@ -1,9 +1,84 @@
|
|||||||
import React from 'react'
|
import React from "react";
|
||||||
|
import "./index.css";
|
||||||
|
import BackgroundPattern from "../../Components/BackgroundPattern/BackgroundPattern";
|
||||||
|
import Logomark from "../../assets/Images/Logomark.png";
|
||||||
|
import EmailTextField from "../../Components/TextFields/Email/EmailTextField";
|
||||||
|
import PasswordTextField from "../../Components/TextFields/Password/PasswordTextField";
|
||||||
|
import StringTextField from "../../Components/TextFields/Text/TextField";
|
||||||
|
import Check from "../../Components/Check/Check";
|
||||||
|
import Button from "../../Components/Button";
|
||||||
|
import Google from "../../assets/Images/Google.png";
|
||||||
|
|
||||||
const Register = () => {
|
const Register = () => {
|
||||||
return (
|
return (
|
||||||
<div>Register</div>
|
<div className="register-page">
|
||||||
)
|
<BackgroundPattern></BackgroundPattern>
|
||||||
}
|
<div className="register-form">
|
||||||
|
<div className="register-form-header">
|
||||||
|
<img
|
||||||
|
className="register-form-header-logo"
|
||||||
|
src={Logomark}
|
||||||
|
alt="Logomark"
|
||||||
|
/>
|
||||||
|
<div className="register-form-v-spacing-24px" />
|
||||||
|
<div className="register-form-heading">Create an account</div>
|
||||||
|
<div className="register-form-v-spacing-12px"></div>
|
||||||
|
<div className="register-form-subheading">
|
||||||
|
Start your 30-day free trial.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="register-form-v-spacing-40px" />
|
||||||
|
<div className="register-form-inputs">
|
||||||
|
<StringTextField
|
||||||
|
error={false}
|
||||||
|
label="First name*"
|
||||||
|
placeholder="Enter your first name"
|
||||||
|
id="register-firstname-input"
|
||||||
|
/>
|
||||||
|
<div className="login-form-v2-spacing" />
|
||||||
|
<StringTextField
|
||||||
|
error={false}
|
||||||
|
label="Last name*"
|
||||||
|
placeholder="Enter your last name"
|
||||||
|
id="register-lastname-input"
|
||||||
|
/>
|
||||||
|
<div className="login-form-v2-spacing" />
|
||||||
|
<EmailTextField
|
||||||
|
label="Email*"
|
||||||
|
error={false}
|
||||||
|
placeholder="Enter your email"
|
||||||
|
id="register-email-input"
|
||||||
|
/>
|
||||||
|
<div className="login-form-v2-spacing" />
|
||||||
|
<PasswordTextField
|
||||||
|
label="Password*"
|
||||||
|
error={false}
|
||||||
|
placeholder="Create a password"
|
||||||
|
id="register-password-input"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="login-form-v2-spacing" />
|
||||||
|
<div className="register-form-checks">
|
||||||
|
<Check text="Must be at least 8 characters" />
|
||||||
|
<div className="register-form-v-spacing-12px"></div>
|
||||||
|
<Check text="Must contain one special character" />
|
||||||
|
</div>
|
||||||
|
<div className="login-form-v2-spacing" />
|
||||||
|
<div className="register-form-actions">
|
||||||
|
<Button level="primary" label="Get started" sx={{ width: "100%" }} />
|
||||||
|
<div className="login-form-v-spacing" />
|
||||||
|
<Button
|
||||||
|
disabled={true}
|
||||||
|
level="secondary"
|
||||||
|
label="Sign up with Google"
|
||||||
|
sx={{ width: "100%", color: "#344054", fontWeight: "700" }}
|
||||||
|
img={<img className="google-enter" src={Google} alt="Google" />}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="register-bottom-spacing"></div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export default Register
|
export default Register;
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 571 B |
Reference in new issue
Block a user