add prettier formatter to all file
This commit is contained in:
@@ -1,51 +1,51 @@
|
||||
import { Button } from '@mui/material'
|
||||
import React from 'react'
|
||||
import MoonP from '@/components/icons/MoonP'
|
||||
import NotificationP from '@/components/icons/NotificationP'
|
||||
import SettingP from '@/components/icons/SettingP'
|
||||
import SearchHeaderP from '@/components/icons/SearchHeaderP'
|
||||
import { Button } from "@mui/material";
|
||||
import React from "react";
|
||||
import MoonP from "@/components/icons/MoonP";
|
||||
import NotificationP from "@/components/icons/NotificationP";
|
||||
import SettingP from "@/components/icons/SettingP";
|
||||
import SearchHeaderP from "@/components/icons/SearchHeaderP";
|
||||
|
||||
function Icons() {
|
||||
return (
|
||||
<div className="flex items-center justify-start gap-[12px]">
|
||||
<Button
|
||||
className="
|
||||
return (
|
||||
<div className="flex items-center justify-start gap-[12px]">
|
||||
<Button
|
||||
className="
|
||||
!p-[8px] !border-[#EFEFEF] !rounded-[8px]
|
||||
!w-[32px] md:!w-[36px] lg:!w-[40px]
|
||||
!h-[32px] md:!h-[36px] lg:!h-[40px]
|
||||
!min-w-[32px] md:!min-w-[36px] lg:!min-w-[40px]
|
||||
!min-h-[32px] md:!min-h-[36px] lg:!min-h-[40px]
|
||||
"
|
||||
variant="outlined"
|
||||
>
|
||||
<MoonP />
|
||||
</Button>
|
||||
<Button
|
||||
className="
|
||||
variant="outlined"
|
||||
>
|
||||
<MoonP />
|
||||
</Button>
|
||||
<Button
|
||||
className="
|
||||
!p-[8px] !border-[#EFEFEF] !rounded-[8px]
|
||||
!w-[32px] md:!w-[36px] lg:!w-[40px]
|
||||
!h-[32px] md:!h-[36px] lg:!h-[40px] md:!hidden
|
||||
!min-w-[32px] md:!min-w-[36px] lg:!min-w-[40px]
|
||||
!min-h-[32px] md:!min-h-[36px] lg:!min-h-[40px]
|
||||
"
|
||||
variant="outlined"
|
||||
>
|
||||
<SearchHeaderP />
|
||||
</Button>
|
||||
<Button
|
||||
className="
|
||||
variant="outlined"
|
||||
>
|
||||
<SearchHeaderP />
|
||||
</Button>
|
||||
<Button
|
||||
className="
|
||||
!p-[8px] !border-[#EFEFEF] !rounded-[8px]
|
||||
!w-[32px] md:!w-[36px] lg:!w-[40px]
|
||||
!h-[32px] md:!h-[36px] lg:!h-[40px]
|
||||
!min-w-[32px] md:!min-w-[36px] lg:!min-w-[40px]
|
||||
!min-h-[32px] md:!min-h-[36px] lg:!min-h-[40px]
|
||||
"
|
||||
variant="outlined"
|
||||
>
|
||||
<SettingP />
|
||||
</Button>
|
||||
<Button
|
||||
className='
|
||||
variant="outlined"
|
||||
>
|
||||
<SettingP />
|
||||
</Button>
|
||||
<Button
|
||||
className="
|
||||
!w-[32px] md:!w-[36px] lg:!w-[40px]
|
||||
!h-[32px] md:!h-[36px] lg:!h-[40px]
|
||||
!min-w-[32px] md:!min-w-[36px] lg:!min-w-[40px]
|
||||
@@ -53,13 +53,13 @@ function Icons() {
|
||||
!p-[8px] !border-[#EFEFEF] !rounded-[8px] !relative before:!rounded-full
|
||||
before:!absolute before:!right-[-2px] before:!top-[-2px] before:!w-[6px] before:!h-[6px]
|
||||
before:!bg-[#D32F2F]
|
||||
'
|
||||
variant="outlined"
|
||||
>
|
||||
<NotificationP />
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
"
|
||||
variant="outlined"
|
||||
>
|
||||
<NotificationP />
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Icons
|
||||
export default Icons;
|
||||
|
||||
@@ -1,108 +1,109 @@
|
||||
import { useState } from 'react';
|
||||
import { Button, Popover } from '@mui/material';
|
||||
import ArrowBottomHD from '@/components/icons/ArrowBottomHD';
|
||||
import ProfilePA from '@/components/icons/ProfilePA';
|
||||
import LogoutP from '@/components/icons/LogoutP';
|
||||
import SettingPA from '@/components/icons/SettingPA';
|
||||
import CardDA from '@/components/icons/CardDA';
|
||||
import Image from 'next/image';
|
||||
import { useState } from "react";
|
||||
import { Button, Popover } from "@mui/material";
|
||||
import ArrowBottomHD from "@/components/icons/ArrowBottomHD";
|
||||
import ProfilePA from "@/components/icons/ProfilePA";
|
||||
import LogoutP from "@/components/icons/LogoutP";
|
||||
import SettingPA from "@/components/icons/SettingPA";
|
||||
import CardDA from "@/components/icons/CardDA";
|
||||
import Image from "next/image";
|
||||
|
||||
function MenuProfile({ data }) {
|
||||
const [anchorEl, setAnchorEl] = useState(null);
|
||||
|
||||
const [anchorEl, setAnchorEl] = useState(null);
|
||||
const handleClick = (event) => setAnchorEl(event.currentTarget);
|
||||
const handleClose = () => setAnchorEl(null);
|
||||
|
||||
const handleClick = (event) => setAnchorEl(event.currentTarget);
|
||||
const handleClose = () => setAnchorEl(null);
|
||||
const open = Boolean(anchorEl);
|
||||
const id = open ? "simple-popover" : undefined;
|
||||
|
||||
const open = Boolean(anchorEl);
|
||||
const id = open ? 'simple-popover' : undefined;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Image
|
||||
className='flex md:hidden w-[32px] h-[32px] rounded-full'
|
||||
src={data.src}
|
||||
alt='profile'
|
||||
height={32}
|
||||
width={32}
|
||||
/>
|
||||
<Button
|
||||
variant='text'
|
||||
onClick={handleClick}
|
||||
className='!hidden md:!flex !items-start !justify-center !gap-[8px] !p-1'
|
||||
>
|
||||
<Image
|
||||
className='w-[48px] h-[48px] rounded-full'
|
||||
src={data.src}
|
||||
alt='profile'
|
||||
height={48}
|
||||
width={48}
|
||||
/>
|
||||
<div className='flex flex-col items-start justify-between gap-[3px]'>
|
||||
<p className='text-[#3B3B3B] text-[14px] font-semibold'>{data.name}</p>
|
||||
<p className='text-[#7E7E7E] text-[12px] font-normal'>{data.expertise}</p>
|
||||
</div>
|
||||
<div className='mr-[4px]'>
|
||||
<ArrowBottomHD />
|
||||
</div>
|
||||
</Button>
|
||||
<Popover
|
||||
id={id}
|
||||
open={open}
|
||||
anchorEl={anchorEl}
|
||||
onClose={handleClose}
|
||||
anchorOrigin={{
|
||||
vertical: 'bottom',
|
||||
horizontal: 'left',
|
||||
}}
|
||||
>
|
||||
<div
|
||||
className='flex pt-[11px] pb-[14px] flex-col items-start gap-[8px] min-w-[185px]'
|
||||
>
|
||||
<Button
|
||||
fullWidth
|
||||
variant='text'
|
||||
className='!text-[#7E7E7E] !text-[14px] !font-medium !flex !justify-start !p-[8px] !gap-[5px]'
|
||||
>
|
||||
<ProfilePA />
|
||||
پروفایل من
|
||||
</Button>
|
||||
<Button
|
||||
fullWidth
|
||||
variant='text'
|
||||
className='!text-[#7E7E7E] !text-[14px] !font-medium !flex !justify-start !p-[8px] !gap-[5px]'
|
||||
>
|
||||
<CardDA />
|
||||
پرداخت ها
|
||||
</Button>
|
||||
<Button
|
||||
fullWidth
|
||||
variant='text'
|
||||
className='!text-[#7E7E7E] !text-[14px] !font-medium !flex !justify-start !p-[8px] !gap-[5px]'
|
||||
>
|
||||
<SettingPA />
|
||||
تنظیمات
|
||||
</Button>
|
||||
<Button
|
||||
fullWidth
|
||||
color='error'
|
||||
variant='contained'
|
||||
onClick={handleClose}
|
||||
sx={{
|
||||
'&.MuiButtonBase-root': {
|
||||
paddingTop: '8px !important',
|
||||
paddingBottom: '8px !important'
|
||||
},
|
||||
}}
|
||||
className='!flex !w-[calc(100%-16px)] !mx-auto !text-[#FAFAFA] !text-[14px] !font-medium !items-center !justify-center !gap-[5px]'
|
||||
>
|
||||
<LogoutP />
|
||||
خروج
|
||||
</Button>
|
||||
</div>
|
||||
</Popover>
|
||||
</>
|
||||
)
|
||||
return (
|
||||
<>
|
||||
<Image
|
||||
className="flex md:hidden w-[32px] h-[32px] rounded-full"
|
||||
src={data.src}
|
||||
alt="profile"
|
||||
height={32}
|
||||
width={32}
|
||||
/>
|
||||
<Button
|
||||
variant="text"
|
||||
onClick={handleClick}
|
||||
className="!hidden md:!flex !items-start !justify-center !gap-[8px] !p-1"
|
||||
>
|
||||
<Image
|
||||
className="w-[48px] h-[48px] rounded-full"
|
||||
src={data.src}
|
||||
alt="profile"
|
||||
height={48}
|
||||
width={48}
|
||||
/>
|
||||
<div className="flex flex-col items-start justify-between gap-[3px]">
|
||||
<p className="text-[#3B3B3B] text-[14px] font-semibold">
|
||||
{data.name}
|
||||
</p>
|
||||
<p className="text-[#7E7E7E] text-[12px] font-normal">
|
||||
{data.expertise}
|
||||
</p>
|
||||
</div>
|
||||
<div className="mr-[4px]">
|
||||
<ArrowBottomHD />
|
||||
</div>
|
||||
</Button>
|
||||
<Popover
|
||||
id={id}
|
||||
open={open}
|
||||
anchorEl={anchorEl}
|
||||
onClose={handleClose}
|
||||
anchorOrigin={{
|
||||
vertical: "bottom",
|
||||
horizontal: "left",
|
||||
}}
|
||||
>
|
||||
<div className="flex pt-[11px] pb-[14px] flex-col items-start gap-[8px] min-w-[185px]">
|
||||
<Button
|
||||
fullWidth
|
||||
variant="text"
|
||||
className="!text-[#7E7E7E] !text-[14px] !font-medium !flex !justify-start !p-[8px] !gap-[5px]"
|
||||
>
|
||||
<ProfilePA />
|
||||
پروفایل من
|
||||
</Button>
|
||||
<Button
|
||||
fullWidth
|
||||
variant="text"
|
||||
className="!text-[#7E7E7E] !text-[14px] !font-medium !flex !justify-start !p-[8px] !gap-[5px]"
|
||||
>
|
||||
<CardDA />
|
||||
پرداخت ها
|
||||
</Button>
|
||||
<Button
|
||||
fullWidth
|
||||
variant="text"
|
||||
className="!text-[#7E7E7E] !text-[14px] !font-medium !flex !justify-start !p-[8px] !gap-[5px]"
|
||||
>
|
||||
<SettingPA />
|
||||
تنظیمات
|
||||
</Button>
|
||||
<Button
|
||||
fullWidth
|
||||
color="error"
|
||||
variant="contained"
|
||||
onClick={handleClose}
|
||||
sx={{
|
||||
"&.MuiButtonBase-root": {
|
||||
paddingTop: "8px !important",
|
||||
paddingBottom: "8px !important",
|
||||
},
|
||||
}}
|
||||
className="!flex !w-[calc(100%-16px)] !mx-auto !text-[#FAFAFA] !text-[14px] !font-medium !items-center !justify-center !gap-[5px]"
|
||||
>
|
||||
<LogoutP />
|
||||
خروج
|
||||
</Button>
|
||||
</div>
|
||||
</Popover>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default MenuProfile
|
||||
export default MenuProfile;
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
import SearchHeaderP from "@/components/icons/SearchHeaderP"
|
||||
import { InputAdornment, TextField } from "@mui/material"
|
||||
import SearchHeaderP from "@/components/icons/SearchHeaderP";
|
||||
import { InputAdornment, TextField } from "@mui/material";
|
||||
|
||||
function Search() {
|
||||
return (
|
||||
<TextField
|
||||
fullWidth
|
||||
placeholder="جستجو"
|
||||
className="!hidden md:!flex"
|
||||
InputProps={{
|
||||
startAdornment: (
|
||||
<InputAdornment position="start">
|
||||
<SearchHeaderP />
|
||||
</InputAdornment>
|
||||
),
|
||||
}}
|
||||
sx={{
|
||||
'& .MuiOutlinedInput-input': {
|
||||
paddingTop: '9px !important',
|
||||
paddingBottom: '9px !important'
|
||||
},
|
||||
'& .MuiFormLabel-root': {
|
||||
top: '-4px !important'
|
||||
},
|
||||
'& .MuiInputBase-root': {
|
||||
borderRadius: '8px',
|
||||
},
|
||||
'& .MuiOutlinedInput-input': {
|
||||
paddingTop: '9px !important',
|
||||
paddingBottom: '9px !important'
|
||||
},
|
||||
'& .MuiOutlinedInput-notchedOutline': {
|
||||
border: '1px solid #EFEFEF !important',
|
||||
transition: '0.3s all !important'
|
||||
},
|
||||
'& .MuiOutlinedInput-root': {
|
||||
'&.MuiInputBase-root,.MuiFormLabel-root ': {
|
||||
color: '#7E7E7E !important',
|
||||
fontsize: '14px',
|
||||
fontweight: '400',
|
||||
},
|
||||
'&:hover .MuiOutlinedInput-notchedOutline': {
|
||||
border: '1px solid #EFEFEF !important',
|
||||
},
|
||||
'&.Mui-focused .MuiOutlinedInput-notchedOutline': {
|
||||
border: '1px solid #5559CE !important',
|
||||
transition: '0.3s all !important'
|
||||
},
|
||||
},
|
||||
}}
|
||||
/>
|
||||
)
|
||||
return (
|
||||
<TextField
|
||||
fullWidth
|
||||
placeholder="جستجو"
|
||||
className="!hidden md:!flex"
|
||||
InputProps={{
|
||||
startAdornment: (
|
||||
<InputAdornment position="start">
|
||||
<SearchHeaderP />
|
||||
</InputAdornment>
|
||||
),
|
||||
}}
|
||||
sx={{
|
||||
"& .MuiOutlinedInput-input": {
|
||||
paddingTop: "9px !important",
|
||||
paddingBottom: "9px !important",
|
||||
},
|
||||
"& .MuiFormLabel-root": {
|
||||
top: "-4px !important",
|
||||
},
|
||||
"& .MuiInputBase-root": {
|
||||
borderRadius: "8px",
|
||||
},
|
||||
"& .MuiOutlinedInput-input": {
|
||||
paddingTop: "9px !important",
|
||||
paddingBottom: "9px !important",
|
||||
},
|
||||
"& .MuiOutlinedInput-notchedOutline": {
|
||||
border: "1px solid #EFEFEF !important",
|
||||
transition: "0.3s all !important",
|
||||
},
|
||||
"& .MuiOutlinedInput-root": {
|
||||
"&.MuiInputBase-root,.MuiFormLabel-root ": {
|
||||
color: "#7E7E7E !important",
|
||||
fontsize: "14px",
|
||||
fontweight: "400",
|
||||
},
|
||||
"&:hover .MuiOutlinedInput-notchedOutline": {
|
||||
border: "1px solid #EFEFEF !important",
|
||||
},
|
||||
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
||||
border: "1px solid #5559CE !important",
|
||||
transition: "0.3s all !important",
|
||||
},
|
||||
},
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default Search
|
||||
export default Search;
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
import { Button } from "@mui/material"
|
||||
import { Button } from "@mui/material";
|
||||
|
||||
function ButtonMenu({ setActive }) {
|
||||
return (
|
||||
<Button
|
||||
onClick={() => setActive(true)}
|
||||
className="!py-[6px] !px-[2px] !flex !p-0.5 !w-[24px] !h-[24px] !flex-col !justify-between !items-center"
|
||||
>
|
||||
<span
|
||||
className='min-h-[2px] transition-all duration-500 ease-in-out rounded-[40px] bg-[#6C757D] rotate-0 w-full'
|
||||
></span>
|
||||
<span
|
||||
className='w-full min-h-[2px] transition-all duration-500 ease-in-out rounded-[40px] bg-[#6C757D] rotate-180'
|
||||
></span>
|
||||
<span
|
||||
className='min-h-[2px] transition-all duration-500 ease-in-out rounded-[40px] bg-[#6C757D] rotate-0 w-full'
|
||||
></span>
|
||||
</Button>
|
||||
)
|
||||
return (
|
||||
<Button
|
||||
onClick={() => setActive(true)}
|
||||
className="!py-[6px] !px-[2px] !flex !p-0.5 !w-[24px] !h-[24px] !flex-col !justify-between !items-center"
|
||||
>
|
||||
<span className="min-h-[2px] transition-all duration-500 ease-in-out rounded-[40px] bg-[#6C757D] rotate-0 w-full"></span>
|
||||
<span className="w-full min-h-[2px] transition-all duration-500 ease-in-out rounded-[40px] bg-[#6C757D] rotate-180"></span>
|
||||
<span className="min-h-[2px] transition-all duration-500 ease-in-out rounded-[40px] bg-[#6C757D] rotate-0 w-full"></span>
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
export default ButtonMenu
|
||||
export default ButtonMenu;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import ButtonMenu from "./ButtonMenu"
|
||||
import LogoPanelHead from "@/components/icons/LogoPanelHead"
|
||||
import ButtonMenu from "./ButtonMenu";
|
||||
import LogoPanelHead from "@/components/icons/LogoPanelHead";
|
||||
|
||||
function SideButton({ setActive }) {
|
||||
return (
|
||||
<div className="flex md:hidden items-center justify-start gap-[4px]">
|
||||
<ButtonMenu setActive={setActive} />
|
||||
<div className="w-[100px] h-[24px]">
|
||||
<LogoPanelHead />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
return (
|
||||
<div className="flex md:hidden items-center justify-start gap-[4px]">
|
||||
<ButtonMenu setActive={setActive} />
|
||||
<div className="w-[100px] h-[24px]">
|
||||
<LogoPanelHead />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default SideButton
|
||||
export default SideButton;
|
||||
|
||||
Reference in New Issue
Block a user