66 lines
1.3 KiB
TypeScript
66 lines
1.3 KiB
TypeScript
// begin Alert.tsx
|
|
export type MessageType = "info" | "danger" | "success" | "warning" | "dark";
|
|
|
|
export interface AlertProps {
|
|
children: React.ReactNode;
|
|
type?: "info" | "danger" | "success" | "warning" | "dark";
|
|
message: string;
|
|
}
|
|
|
|
// begin Button.tsx
|
|
export interface ButtonProps {
|
|
children: React.ReactNode;
|
|
onClick?: () => void;
|
|
extra?: React.CSSProperties;
|
|
}
|
|
|
|
// begin Route
|
|
export interface Route {
|
|
id: number;
|
|
path: string;
|
|
name: string;
|
|
}
|
|
|
|
// begin MobileMenu.tsx
|
|
export interface MobileMenuProps {
|
|
isOpen: boolean;
|
|
toggleMenu: () => void;
|
|
routes: Route[];
|
|
}
|
|
|
|
// begin MobileMenuButton.tsx
|
|
export interface MobileMenuButtonProps {
|
|
isOpen: boolean;
|
|
onClick: () => void;
|
|
}
|
|
|
|
// begin NavbarLink.tsx
|
|
import { NavLinkProps } from "react-router-dom";
|
|
|
|
export interface NavbarLinkProps {
|
|
to: string;
|
|
children: React.ReactNode;
|
|
onClick?: () => void;
|
|
}
|
|
|
|
export interface NavData {
|
|
isActive: boolean;
|
|
isPending: boolean;
|
|
}
|
|
|
|
// begin ListTutorial.tsx
|
|
import { SetStateAction } from "react";
|
|
|
|
export type TutorialList = { id: number; name: string }[];
|
|
|
|
export interface ListTutorialsProps {
|
|
tutorialList: TutorialList;
|
|
activeTutorial: number;
|
|
setActiveTutorial: SetStateAction;
|
|
}
|
|
|
|
export type LearnProps = {
|
|
activeTutorial: number;
|
|
tutorialList: TutorialList;
|
|
};
|