feat : add types for all props components , add scroll css styles

This commit is contained in:
Ali Josheghani
2024-05-20 22:25:03 +03:30
parent fd7bc724f9
commit 6e52e2634f
15 changed files with 116 additions and 14 deletions

7
src/types/alertProps.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
export type MessageType = "info" | "danger" | "success" | "warning" | "dark";
export interface AlertProps {
children: React.ReactNode;
type?: "info" | "danger" | "success" | "warning" | "dark";
message: string;
}

5
src/types/buttonProps.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
export interface ButtonProps {
children: React.ReactNode;
onClick?: () => void;
extra?: React.CSSProperties;
}

7
src/types/mobileMenu.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
import { Route } from "./routes";
export interface MobileMenuProps {
isOpen: boolean;
toggleMenu: () => void;
routes: Route[];
}

4
src/types/mobileMenuButton.d.ts vendored Normal file
View File

@@ -0,0 +1,4 @@
export interface MobileMenuButtonProps {
isOpen: boolean;
onClick: () => void;
}

12
src/types/navbarLink.d.ts vendored Normal file
View File

@@ -0,0 +1,12 @@
import { NavLinkProps } from "react-router-dom";
export interface NavbarLinkProps {
to: string;
children: React.ReactNode;
onClick?: () => void;
}
export interface NavData {
isActive: boolean;
isPending: boolean;
}

5
src/types/routes.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
export interface Route {
id: number;
path: string;
name: string;
}