feat: add user completion form

This commit is contained in:
2025-07-16 23:30:12 +03:30
parent bcb71666fa
commit 2d68e441e4
5 changed files with 1111 additions and 0 deletions

View File

@@ -0,0 +1,353 @@
import {
TextField,
FormControl,
InputLabel,
MenuItem,
Select,
Box,
type SelectChangeEvent,
Switch,
FormGroup,
Button,
Typography,
Link,
} from '@mui/material';
import React, { useEffect, useState } from 'react';
export function UserCompletionForm() {
const [sex, setSex] = useState('');
const [showPassword, setShowPassword] = useState(false);
const [showEmail, setShowEmail] = useState(false);
const [password, setPassword] = useState('');
const [email, setEmail] = useState('');
const [confirmPassword, setConfirmPassword] = useState('');
const [codeSent, setCodeSent] = useState(false);
const [verificationCode, setVerificationCode] = useState('');
const [buttonState, setButtonState] = useState('default'); // default | counting | sent
const [countdown, setCountdown] = useState(60);
const matchPassword = password === confirmPassword;
const hasNumber = /\d/.test(password);
const hasMinLength = password.length >= 8;
const hasUpperAndLower = /[A-Z]/.test(password) && /[a-z]/.test(password);
const hasSpecialChar = /[!@#$%^&*]/.test(password);
const correctEmail = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
const handleTogglePassword = (e: React.ChangeEvent<HTMLInputElement>) => {
setShowPassword(e.target.checked);
};
const handleToggleEmail = (e: React.ChangeEvent<HTMLInputElement>) => {
setShowEmail(e.target.checked);
};
const handleChange = (e: SelectChangeEvent) => {
setSex(e.target.value);
};
const onClickCodeSent = () => {
setCodeSent(true);
setButtonState('sent');
setTimeout(() => {
setButtonState('counting');
setCountdown(60);
}, 1000);
};
useEffect(() => {
let timer: ReturnType<typeof setInterval>;
if (buttonState === 'counting' && countdown > 0) {
timer = setInterval(() => {
setCountdown((prev) => prev - 1);
}, 1000);
}
if (countdown === 0) {
setButtonState('default');
}
return () => clearInterval(timer);
}, [buttonState, countdown]);
const toPersianDigits = (str: string) =>
str.replace(/\d/g, (d: string) => '۰۱۲۳۴۵۶۷۸۹'[parseInt(d)]);
const getButtonLabel = () => {
if (buttonState === 'sent') return 'ارسال شد!';
if (buttonState === 'counting') {
const minutes = String(Math.floor(countdown / 60)).padStart(2, '0');
const seconds = String(countdown % 60).padStart(2, '0');
const time = `${minutes}:${seconds}`;
return toPersianDigits(time);
}
return 'ارسال کد تایید';
};
return (
<div
dir="rtl"
style={{
backgroundColor: '#F5F5F5',
minHeight: '100vh',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}
>
<Box
sx={{
width: '500px',
backgroundColor: 'white',
border: '1px solid #ccc',
borderRadius: 2,
padding: 5,
margin: '40px auto',
boxShadow: 2,
display: 'flex',
flexDirection: 'column',
gap: 2,
}}
>
<Box sx={{ flexDirection: 'column', mb: 2 }}>
<Typography variant="h5" sx={{ mb: 0.5 }}>
تکمیل اطلاعات حساب کاربری
</Typography>
<Typography sx={{ color: 'gray', fontSize: '14px' }}>
اطلاعات کسب و کار خود را وارد کنید
</Typography>
</Box>
<Box
sx={{
display: 'flex',
gap: 2,
}}
>
<TextField
label="نام"
placeholder="نام"
variant="outlined"
sx={{
width: '330px',
'& .MuiOutlinedInput-root': {
height: 45,
},
}}
/>
<TextField
label="نام خانوادگی"
placeholder="نام خانوادگی"
variant="outlined"
sx={{
width: '330px',
'& .MuiOutlinedInput-root': {
height: 45,
},
}}
/>
</Box>
<Box sx={{ display: 'flex', gap: 2 }}>
<FormControl sx={{ width: '330px' }}>
<InputLabel id="sex-label">جنسیت</InputLabel>
<Select
labelId="sex-label"
id="sex"
value={sex}
label="جنسیت"
onChange={handleChange}
sx={{
height: '45px',
'& .MuiSelect-select': {
paddingY: '10px',
},
}}
>
<MenuItem value="female">زن</MenuItem>
<MenuItem value="male">مرد</MenuItem>
</Select>
</FormControl>
<TextField
label="کدملی(اختیاری)"
placeholder="کدملی(اختیاری)"
variant="outlined"
sx={{
width: '330px',
'& .MuiOutlinedInput-root': {
height: 45,
},
}}
/>
</Box>
<FormGroup>
<Box sx={{ display: 'flex', gap: 0.5, alignItems: 'center' }}>
<Switch
checked={showPassword}
onChange={handleTogglePassword}
sx={{
transform: 'scaleX(-1)',
'& .MuiSwitch-thumb': {
transform: 'scaleX(-1)',
},
}}
/>
<Typography> تعیین رمز عبور</Typography>
</Box>
</FormGroup>
{showPassword && (
<Box sx={{ display: 'flex', gap: 2 }}>
<Box
sx={{ display: 'flex', flexDirection: 'column', width: '330px' }}
>
<TextField
label="رمز عبور"
value={password}
onChange={(e) => setPassword(e.target.value)}
variant="outlined"
sx={{
'& .MuiOutlinedInput-root': {
height: 45,
},
}}
/>
{password && (
<Box sx={{ mt: 1 }}>
<Typography
variant="caption"
sx={{ color: hasNumber ? 'green' : 'red' }}
>
شامل عدد
</Typography>
<br />
<Typography
variant="caption"
sx={{ color: hasMinLength ? 'green' : 'red' }}
>
حداقل 8 کاراکتر
</Typography>
<br />
<Typography
variant="caption"
sx={{ color: hasUpperAndLower ? 'green' : 'red' }}
>
شامل یک حرف بزرگ و کوچک
</Typography>
<br />
<Typography
variant="caption"
sx={{ color: hasSpecialChar ? 'green' : 'red' }}
>
شامل علامت(!@#$%^&*)
</Typography>
</Box>
)}
</Box>
{showPassword && (
<TextField
label="تکرار رمز عبور"
variant="outlined"
onChange={(e) => setConfirmPassword(e.target.value)}
error={confirmPassword.length > 0 && !matchPassword}
helperText={
confirmPassword.length > 0 && !matchPassword
? 'مطابقت ندارد'
: ' '
}
sx={{
width: '330px',
'& .MuiOutlinedInput-root': {
height: 45,
},
}}
/>
)}
</Box>
)}
<FormGroup>
<Box sx={{ display: 'flex', gap: 0.5, alignItems: 'center' }}>
<Switch
checked={showEmail}
onChange={handleToggleEmail}
sx={{
transform: 'scaleX(-1)',
'& .MuiSwitch-thumb': {
transform: 'scaleX(-1)',
},
}}
/>
<Typography> اتصال ایمیل خود</Typography>
</Box>
</FormGroup>
{showEmail && (
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
<Box sx={{ display: 'flex', gap: 2 }}>
<Box sx={{ display: 'flex', flexDirection: 'column' }}>
<TextField
label="ایمیل"
variant="outlined"
value={email}
onChange={(e) => setEmail(e.target.value)}
sx={{
width: '330px',
'& .MuiOutlinedInput-root': {
height: 45,
},
}}
/>
{email && (
<Typography sx={{ color: correctEmail ? 'green' : 'red' }}>
فرم درست ایمیل وارد کنید
</Typography>
)}
</Box>
<Button
variant="text"
onClick={onClickCodeSent}
sx={{ width: '200px' }}
disabled={buttonState === 'sent' || buttonState === 'counting'}
>
{getButtonLabel()}
</Button>
</Box>
{codeSent && (
<Box sx={{ display: 'flex', gap: 2 }}>
<TextField
label="کد تایید"
variant="outlined"
value={verificationCode}
onChange={(e) => setVerificationCode(e.target.value)}
sx={{
width: '330px',
'& .MuiOutlinedInput-root': {
height: 45,
},
}}
/>
<Button
variant="contained"
sx={{
width: '150px',
backgroundColor: 'white',
border: 0.5,
borderColor: '#1976d2',
color: '#1976d2',
}}
>
بررسی کد
</Button>
</Box>
)}
</Box>
)}
<Box sx={{ display: 'flex', gap: 2 }}>
<Typography variant="body2" sx={{ flex: 1 }}>
ادامه فرایند ثبت نام به منزله تایید و قبول{' '}
<Link href="" target="_blank" rel="">
قوانین و مقررات هارمونی
</Link>{' '}
می باشد.
</Typography>
<Button variant="contained" sx={{ width: '250px', height: '40px' }}>
تایید و ثبت نام
</Button>
</Box>
</Box>
</div>
);
}

View File

@@ -0,0 +1,229 @@
import {
Box,
Typography,
Button,
TextField,
Grid,
FormControl,
Select,
MenuItem,
type SelectChangeEvent,
} from '@mui/material';
import { useState, type ChangeEvent } from 'react';
export function PersonalInformation() {
const [isEditing, setIsEditing] = useState(false);
const [gender, setGender] = useState('');
const [data, setData] = useState({
firstName: 'محمد حسین',
lastName: 'برزه‌گر',
gender: 'مرد',
nationalCode: '',
});
const handleChange = (e: ChangeEvent<HTMLInputElement>) => {
setData((prev) => ({
...prev,
[e.target.name]: e.target.value,
}));
};
const toggleEdit = () => {
setIsEditing((prev) => !prev);
if (isEditing) {
setData((prev) => ({
...prev,
gender: gender === 'male' ? 'مرد' : gender === 'female' ? 'زن' : '',
}));
} else {
setGender(
data.gender === 'مرد' ? 'male' : data.gender === 'زن' ? 'female' : '',
);
}
};
const handleChangeGender = (e: SelectChangeEvent) => {
setGender(e.target.value);
};
const displayValue = (value: string | null | undefined) => {
return value && value.trim() !== '' ? value : 'تعیین نشده';
};
return (
<div
style={{
display: 'flex',
backgroundColor: '#F5F5F5',
justifyContent: 'center',
alignItems: 'center',
}}
>
<Box
sx={{
width: '600px',
backgroundColor: 'white',
display: 'flex',
flexDirection: 'column',
gap: 2,
}}
>
<Box
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
backgroundColor: isEditing ? '#ADD8E6' : '#F5F5F5',
p: 2,
borderRadius: 1,
}}
>
<Box sx={{ display: 'flex', flexDirection: 'column' }}>
<Typography
variant="h6"
sx={{ color: isEditing ? '#1976d2' : 'black' }}
>
اطلاعات شخصی من
</Typography>
<Typography
variant="subtitle2"
sx={{ color: isEditing ? '#1976d2' : 'gray', fontSize: '13px' }}
>
این اطلاعات شما صرفا برای احراز هویت شما است و نزد هارمونی باقی
میماند
</Typography>
</Box>
<Box sx={{ display: 'flex', gap: 1 }}>
{isEditing && (
<Button
onClick={() => setIsEditing(false)}
sx={{
backgroundColor: '#ADD8E6',
color: '#1976d2',
width: '80px',
height: '30px',
}}
>
لغو
</Button>
)}
<Button
onClick={toggleEdit}
sx={{
border: 0.5,
borderColor: '#1976d2',
borderRadius: '5px',
backgroundColor: isEditing ? '#1976d2' : 'white',
color: isEditing ? 'white' : '#1976d2',
width: '80px',
height: '30px',
}}
>
{isEditing ? 'ذخیره' : 'ویرایش'}
</Button>
</Box>
</Box>
<Grid container spacing={4}>
<Grid item xs={6}>
{isEditing ? (
<TextField
fullWidth
name="firstName"
value={data.firstName}
onChange={handleChange}
inputProps={{ sx: { height: '12px' } }}
label="نام"
/>
) : (
<Box sx={{ width: '250px' }}>
<Typography variant="caption" sx={{ color: 'gray' }}>
نام
</Typography>
<Typography variant="subtitle2">
{displayValue(data.firstName)}
</Typography>
</Box>
)}
</Grid>
<Grid item xs={6}>
{isEditing ? (
<TextField
fullWidth
name="lastName"
value={data.lastName}
onChange={handleChange}
inputProps={{ sx: { height: '12px' } }}
label="نام خانوادگی"
/>
) : (
<Box sx={{ width: '200px' }}>
<Typography variant="caption" sx={{ color: 'gray' }}>
نام خانوادگی
</Typography>
<Typography variant="subtitle2">
{displayValue(data.lastName)}
</Typography>
</Box>
)}
</Grid>
<Grid item xs={6}>
{isEditing ? (
<FormControl fullWidth>
<Select
value={gender}
onChange={handleChangeGender}
sx={{
height: '45px',
width: '210px',
'& .MuiSelect-select': {
paddingY: '10px',
},
}}
label="جنسیت"
>
<MenuItem value="female">زن</MenuItem>
<MenuItem value="male">مرد</MenuItem>
</Select>
</FormControl>
) : (
<Box sx={{ width: '250px' }}>
<Typography variant="caption" sx={{ color: 'gray' }}>
جنسیت
</Typography>
<Typography variant="subtitle1">
{displayValue(data.gender)}
</Typography>
</Box>
)}
</Grid>
<Grid item xs={6}>
{isEditing ? (
<TextField
fullWidth
name="nationalCode"
value={data.nationalCode}
onChange={handleChange}
inputProps={{ sx: { height: '12px' } }}
label="کدملی"
/>
) : (
<Box>
<Typography variant="caption" sx={{ color: 'gray' }}>
کد ملی
</Typography>
<Typography variant="subtitle2">
{displayValue(data.nationalCode)}
</Typography>
</Box>
)}
</Grid>
</Grid>
</Box>
</div>
);
}

View File

@@ -0,0 +1,306 @@
import {
Box,
Typography,
Button,
Dialog,
DialogTitle,
DialogContent,
IconButton,
TextField,
} from '@mui/material';
import { Edit, CloseSquare } from 'iconsax-react';
import { useState, useEffect } from 'react';
export function PhoneNumber() {
const [open, setOpen] = useState(false);
const [dialogStep, setDialogStep] = useState<'enterPhone' | 'verifyCode'>(
'enterPhone',
);
const [buttonState, setButtonState] = useState('default'); // default | counting | sent
const [countdown, setCountdown] = useState(120);
const handleChangePhoneNumber = () => {
setOpen(true);
};
const handleClose = () => {
setOpen(false);
setDialogStep('enterPhone');
};
const handleSendCode = () => {
setDialogStep('verifyCode');
setButtonState('sent');
setTimeout(() => {
setButtonState('counting');
setCountdown(120);
}, 1000);
};
const handleResendCode = () => {
setButtonState('sent');
setTimeout(() => {
setButtonState('counting');
setCountdown(120);
}, 1000);
};
useEffect(() => {
if (buttonState === 'counting' && countdown > 0) {
const timer = setInterval(() => {
setCountdown((prev) => prev - 1);
}, 1000);
return () => clearInterval(timer);
}
if (countdown === 0 && buttonState === 'counting') {
setButtonState('default');
}
}, [buttonState, countdown]);
const toPersianDigits = (str: string) =>
str.replace(/\d/g, (d: string) => '۰۱۲۳۴۵۶۷۸۹'[parseInt(d)]);
const getButtonLabel = () => {
if (buttonState === 'sent') return 'ارسال شد!';
if (buttonState === 'counting') {
const minutes = String(Math.floor(countdown / 60)).padStart(2, '0');
const seconds = String(countdown % 60).padStart(2, '0');
const time = `${minutes}:${seconds}`;
return toPersianDigits(time);
}
return 'ارسال دوباره کد';
};
const handleEdit = () => {
setDialogStep('enterPhone');
};
return (
<div
style={{
backgroundColor: '#F5F5F5',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}
>
<Box
sx={{
width: '600px',
backgroundColor: 'white',
boxShadow: 2,
display: 'flex',
flexDirection: 'column',
gap: 2,
}}
>
<Box
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
backgroundColor: '#F5F5F5',
p: 2,
borderRadius: 1,
}}
>
<Box sx={{ display: 'flex', flexDirection: 'column' }}>
<Typography variant="h6">شماره تماس من</Typography>
<Typography sx={{ color: 'gray' }} variant="subtitle2">
این اطلاعات شما صرفا برای احراز هویت شما است و نزد هارمونی باقی
میماند
</Typography>
</Box>
<Button
onClick={handleChangePhoneNumber}
sx={{
border: 0.5,
borderColor: '#1976d2',
borderRadius: '5px',
backgroundColor: 'white',
color: '#1976d2',
width: '150px',
height: '30px',
}}
>
تغییر شماره تماس
</Button>
</Box>
<Box
sx={{
display: 'flex',
alignItems: 'center',
p: 2,
borderRadius: 1,
justifyContent: 'space-between',
}}
>
<Box
sx={{
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-end',
}}
>
<Typography variant="h6" sx={{ fontWeight: 'bold' }}>
09909366045
</Typography>
<Typography variant="caption" sx={{ color: 'gray' }}>
۱ ماه پیش
</Typography>
</Box>
{/* <IconButton
sx={{
border: '1px solid #1976d2',
color: '#1976d2',
borderRadius: '12px',
width: '40px',
height: '40px',
}}
onClick={handleChangePhoneNumber}
></IconButton> */}
</Box>
</Box>
<Dialog open={open} onClose={handleClose} fullWidth maxWidth="xs">
<DialogTitle
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
backgroundColor: '#F5F5F5',
}}
>
ویرایش شماره تماس
<IconButton onClick={handleClose}>
<CloseSquare size="24" color="gray" variant="Outline" />
</IconButton>
</DialogTitle>
<DialogContent>
<Box sx={{ width: '100%', display: 'flex', flexDirection: 'column' }}>
{dialogStep === 'enterPhone' ? (
<>
<Typography variant="subtitle1" sx={{ mb: 1 }}>
شماره تماس جدید
</Typography>
<Typography variant="subtitle2" sx={{ color: 'gray', mb: 2 }}>
شماره تماس جدید جایگزین شماره تماس قبلی شما خواهد شد
</Typography>
<TextField
fullWidth
label="شماره تماس"
placeholder="09123456789"
sx={{
mb: 2,
'& .MuiOutlinedInput-root': {
'& fieldset': {
borderColor: '#1976d2',
},
'&:hover fieldset': {
borderColor: '#1976d2',
},
'&.Mui-focused fieldset': {
borderColor: '#1976d2',
},
},
'& label.Mui-focused': {
color: '#1976d2',
},
}}
/>
<Button
onClick={handleSendCode}
variant="contained"
fullWidth
sx={{
borderRadius: '10px',
backgroundColor: '#1976d2',
'&:hover': { backgroundColor: '#115293' },
}}
>
ارسال کد تایید
</Button>
</>
) : (
<>
<Box sx={{ display: 'flex', gap: 1 }}>
<Box>
<Typography variant="subtitle1" sx={{ mb: 1 }}>
اعتبار سنجی
</Typography>
<Typography
variant="subtitle2"
sx={{ color: 'gray', mb: 2 }}
>
کد تایید 4 رقمی به شماره موبایل شما ارسال شد. لطفا آن را
وارد کنید
</Typography>
</Box>
<Button
sx={{
border: 0.5,
borderColor: '#1976d2',
height: '35px',
color: '#1976d2',
width: '150px',
}}
onClick={handleEdit}
>
<Edit />
09123456789
</Button>
</Box>
<TextField
fullWidth
label="کد تایید"
placeholder="کد تایید را وارد کنید"
sx={{
mb: 2,
'& .MuiOutlinedInput-root': {
'& fieldset': {
borderColor: '#1976d2',
},
'&:hover fieldset': {
borderColor: '#1976d2',
},
'&.Mui-focused fieldset': {
borderColor: '#1976d2',
},
},
'& label.Mui-focused': {
color: '#1976d2',
},
}}
/>
<Box sx={{ display: 'flex' }}>
<Button
variant="text"
onClick={handleResendCode}
sx={{ width: '200px' }}
disabled={
buttonState === 'sent' || buttonState === 'counting'
}
>
{getButtonLabel()}
</Button>
<Button
onClick={handleClose}
variant="contained"
fullWidth
sx={{
borderRadius: '10px',
backgroundColor: '#1976d2',
'&:hover': { backgroundColor: '#115293' },
}}
>
بررسی کد
</Button>
</Box>
</>
)}
</Box>
</DialogContent>
</Dialog>
</div>
);
}

View File

@@ -0,0 +1,210 @@
import { Google, Apple, Sms, Trash, CloseSquare } from 'iconsax-react';
import {
Box,
Button,
Typography,
Dialog,
DialogTitle,
DialogContent,
IconButton,
TextField,
} from '@mui/material';
import { useState } from 'react';
export function SocialMedia() {
const [open, setOpen] = useState(false);
const handleOpen = () => setOpen(true);
const handleClose = () => setOpen(false);
const emailList = [
{ email: 'emailtemp@email.com', provider: 'email' },
{ email: 'emailtemp@gmail.com', provider: 'google' },
];
return (
<div
style={{
backgroundColor: '#F5F5F5',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}
>
<Box
sx={{
width: '600px',
backgroundColor: 'white',
boxShadow: 2,
display: 'flex',
flexDirection: 'column',
gap: 2,
}}
>
<Box
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
backgroundColor: '#F5F5F5',
p: 2,
borderRadius: 1,
}}
>
<Box sx={{ display: 'flex', flexDirection: 'column' }}>
<Typography variant="h6">ایمیل و شبکههای اجتماعی من</Typography>
<Typography sx={{ color: 'gray' }} variant="subtitle2">
این اطلاعات شما صرفاً برای احراز هویت شما است و نزد هارمونی باقی
میماند
</Typography>
</Box>
<Button
onClick={handleOpen}
sx={{
border: 0.5,
borderColor: '#1976d2',
borderRadius: '5px',
backgroundColor: 'white',
color: '#1976d2',
width: '150px',
height: '30px',
}}
>
افزودن ایمیل / سوشال
</Button>
</Box>
{emailList.map((item, index) => (
<Box
key={index}
sx={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
p: 2,
borderRadius: 1,
mt: 1,
}}
>
<Box sx={{ display: 'flex', alignItems: 'center' }}>
{item.provider === 'google' && (
<Google
size="20"
variant="Bold"
color="#4285F4"
style={{ marginLeft: 8 }}
/>
)}
{item.provider === 'apple' && (
<Apple
size="20"
variant="Bold"
color="black"
style={{ marginLeft: 8 }}
/>
)}
{item.provider === 'email' && (
<Sms
size="20"
variant="Bold"
color="#1976d2"
style={{ marginLeft: 8 }}
/>
)}
<Box>
<Typography sx={{ fontWeight: 'bold' }}>
{item.email}
</Typography>
<Typography variant="body2">۱ ماه پیش</Typography>
</Box>
</Box>
<IconButton>
<Trash size="20" color="gray" variant="Outline" />
</IconButton>
</Box>
))}
</Box>
<Dialog open={open} onClose={handleClose} fullWidth maxWidth="xs">
<DialogTitle
sx={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
backgroundColor: '#F5F5F5',
}}
>
افزودن ایمیل / سوشال
<IconButton onClick={handleClose}>
<CloseSquare size="24" color="gray" />
</IconButton>
</DialogTitle>
<DialogContent>
<Box sx={{ width: '100%', display: 'flex', flexDirection: 'column' }}>
<TextField
fullWidth
label="ایمیل"
placeholder="abc@email.com"
sx={{
mb: 2,
'& .MuiOutlinedInput-root': {
'& fieldset': { borderColor: '#1976d2' },
'&:hover fieldset': { borderColor: '#1976d2' },
'&.Mui-focused fieldset': { borderColor: '#1976d2' },
},
'& label.Mui-focused': { color: '#1976d2' },
}}
/>
<Button
variant="contained"
fullWidth
sx={{
borderRadius: '10px',
backgroundColor: '#1976d2',
'&:hover': { backgroundColor: '#115293' },
}}
>
ارسال کد تایید
</Button>
<Box sx={{ display: 'flex', alignItems: 'center', my: 2 }}>
<Box sx={{ flex: 1, height: '1px', backgroundColor: '#ccc' }} />
<Typography sx={{ mx: 1, fontSize: '12px', color: 'gray' }}>
یا
</Typography>
<Box sx={{ flex: 1, height: '1px', backgroundColor: '#ccc' }} />
</Box>
<Box sx={{ display: 'flex', gap: 1 }}>
<Button
sx={{
width: '50%',
border: 2,
borderColor: '#1976d2',
color: '#1976d2',
borderRadius: '8px',
}}
>
<Google size="20" color="#4285F4" style={{ marginLeft: 8 }} />
گوگل
</Button>
<Button
sx={{
width: '50%',
border: 2,
borderColor: '#1976d2',
color: '#1976d2',
borderRadius: '8px',
}}
>
<Apple size="20" color="black" style={{ marginLeft: 8 }} />
اپل
</Button>
</Box>
</Box>
</DialogContent>
</Dialog>
</div>
);
}

View File

@@ -0,0 +1,13 @@
import { PersonalInformation } from './PersonalInformation';
import { PhoneNumber } from './PhoneNumber';
import { SocialMedia } from './SocialMedia';
export function UserForm() {
return (
<>
<PersonalInformation />
<PhoneNumber />
<SocialMedia />
</>
);
}