diff --git a/src/App.tsx b/src/App.tsx index 91a0495..23dc078 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,6 @@ import { type FC, useEffect, useState } from 'react' import { BrowserRouter } from 'react-router-dom' -// import 'swiper/swiper-bundle.css'; +import 'swiper/swiper-bundle.css'; // import 'rc-rate/assets/index.css'; // import "react-multi-date-picker/styles/layouts/mobile.css" import './assets/fonts/irancell/style.css' diff --git a/src/components/Tabs.tsx b/src/components/Tabs.tsx index 01595b5..acacce4 100644 --- a/src/components/Tabs.tsx +++ b/src/components/Tabs.tsx @@ -25,14 +25,14 @@ const Tabs: FC = (props: Props) => { + className='px-10 max-w-full w-fit items-center text-description mx-auto backdrop-blur-md border-2 border-white gap-10 flex h-[80px] rounded-[32px] bg-white/45'> { props.items.map((item: Item, index: number) => { return ( props.onChange(item.value)} key={item.value} className={clx( 'flex flex-col max-w-fit mt-[15px] items-center gap-2 cursor-pointer', index === 0 && 'pr-[30px]', - index === props.items.length - 1 && 'pl-[30px]', + // index === props.items.length - 1 && 'pl-[30px]', props.active === item.value && 'text-black' )}> {item.icon} diff --git a/src/pages/settings/Setting.tsx b/src/pages/settings/Setting.tsx new file mode 100644 index 0000000..f07226c --- /dev/null +++ b/src/pages/settings/Setting.tsx @@ -0,0 +1,46 @@ +import Tabs from '@/components/Tabs' +import { Card, KeySquare, Setting4, TruckFast } from 'iconsax-react' +import { useState, type FC } from 'react' +import { SettingTabEnum } from './enum/Enum' + +const Setting: FC = () => { + + const [activeTab, setActiveTab] = useState(SettingTabEnum.GENERAL) + + return ( +
+

تنظیمات

+ +
+ , + label: 'عمومی', + value: SettingTabEnum.GENERAL, + }, + { + icon: , + label: 'رمز عبور', + value: SettingTabEnum.PASSWORD, + }, + { + icon: , + label: 'مالی', + value: SettingTabEnum.FINANCIAL, + }, + { + icon: , + label: 'روش های ارسال', + value: SettingTabEnum.DELIVERY, + }, + ]} + onChange={(value: string) => setActiveTab(value as SettingTabEnum)} + active={activeTab} + /> +
+
+ ) +} + +export default Setting \ No newline at end of file diff --git a/src/pages/settings/enum/Enum.ts b/src/pages/settings/enum/Enum.ts new file mode 100644 index 0000000..bfcc8c8 --- /dev/null +++ b/src/pages/settings/enum/Enum.ts @@ -0,0 +1,6 @@ +export const enum SettingTabEnum { + GENERAL = "general", + PASSWORD = "password", + FINANCIAL = "financial", + DELIVERY = "delivery", +} diff --git a/src/router/Main.tsx b/src/router/Main.tsx index 38b265f..3f01c24 100644 --- a/src/router/Main.tsx +++ b/src/router/Main.tsx @@ -23,6 +23,7 @@ import RolesList from '@/pages/roles/List' import CreateRole from '@/pages/roles/Create' import UpdateRole from '@/pages/roles/Update' import UpdateSchedule from '@/pages/schedule/Update' +import Setting from '@/pages/settings/Setting' const MainRouter: FC = () => { const { hasSubMenu } = useSharedStore() @@ -57,6 +58,7 @@ const MainRouter: FC = () => { } /> } /> } /> + } /> diff --git a/tsconfig.app.json b/tsconfig.app.json index d075f3e..034cce8 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -3,10 +3,13 @@ "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", "target": "ES2022", "useDefineForClassFields": true, - "lib": ["ES2022", "DOM", "DOM.Iterable"], + "lib": [ + "ES2022", + "DOM", + "DOM.Iterable" + ], "module": "ESNext", "skipLibCheck": true, - /* Bundler mode */ "moduleResolution": "bundler", "allowImportingTsExtensions": true, @@ -14,20 +17,22 @@ "moduleDetection": "force", "noEmit": true, "jsx": "react-jsx", - /* Linting */ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, - "erasableSyntaxOnly": true, + "erasableSyntaxOnly": false, "noFallthroughCasesInSwitch": true, "noUncheckedSideEffectImports": true, - /* Path Mapping */ "baseUrl": ".", "paths": { - "@/*": ["./src/*"] + "@/*": [ + "./src/*" + ] } }, - "include": ["src"] -} + "include": [ + "src" + ] +} \ No newline at end of file diff --git a/tsconfig.node.json b/tsconfig.node.json index 351d6b6..d850124 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -2,25 +2,29 @@ "compilerOptions": { "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", "target": "ES2023", - "lib": ["ES2023"], + "lib": [ + "ES2023" + ], "module": "ESNext", "skipLibCheck": true, - "types": ["node"], - + "types": [ + "node" + ], /* Bundler mode */ "moduleResolution": "bundler", "allowImportingTsExtensions": true, "verbatimModuleSyntax": true, "moduleDetection": "force", "noEmit": true, - /* Linting */ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, - "erasableSyntaxOnly": true, + "erasableSyntaxOnly": false, "noFallthroughCasesInSwitch": true, "noUncheckedSideEffectImports": true }, - "include": ["vite.config.ts"] -} + "include": [ + "vite.config.ts" + ] +} \ No newline at end of file