feat : add progressSpace Components and add in ListConfig

This commit is contained in:
alij
2024-06-08 23:45:05 -07:00
parent 7ef23521c0
commit 0c28e72536
4 changed files with 92 additions and 7 deletions

29
src/types/props.d.ts vendored
View File

@@ -8,9 +8,8 @@ export interface AlertProps {
}
// begin Button.tsx
export interface ButtonProps {
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
children: React.ReactNode;
onClick?: () => void;
extra?: string;
active?: boolean;
}
@@ -50,7 +49,14 @@ export interface NavData {
}
// begin ListTutorial.tsx
import React, { Component, InputHTMLAttributes, SetStateAction } from "react";
import React, {
ButtonHTMLAttributes,
Component,
Dispatch,
InputHTMLAttributes,
ReactNode,
SetStateAction,
} from "react";
export type TutorialList = { id: number; name: string }[];
@@ -112,3 +118,20 @@ export interface ConfigItemProps {
isDisabled: boolean;
}
// نوع Item برای آیتم‌های داخل Dropdown
export interface DropdownItem {
label: string;
value: string;
onClick: () => void;
}
export interface DropdownProps {
isOpen: boolean;
setIsOpen: Dispatch<SetStateAction<boolean>>;
children: ReactNode | ReactNode[];
}
export interface ProgressSpaceProps {
startSpace: number;
endSpace: number | "ultimate";
}