mirror of
https://github.com/Nezumi-2711/react-training.git
synced 2026-09-22 20:01:59 +00:00
38 lines
782 B
TypeScript
38 lines
782 B
TypeScript
// Types
|
|
import { TUser } from './types';
|
|
|
|
interface IMenusContext {
|
|
openId?: string;
|
|
close?: () => void;
|
|
open?: React.Dispatch<React.SetStateAction<string>>;
|
|
}
|
|
|
|
interface IButton {
|
|
children?: string;
|
|
icon?: JSX.Element;
|
|
onClick?: () => void;
|
|
}
|
|
|
|
interface ITable {
|
|
columns?: string;
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
interface ITableBody<T> {
|
|
data?: T[];
|
|
render?: (value: T) => JSX.Element;
|
|
}
|
|
|
|
interface IDialogProps {
|
|
title?: string;
|
|
children?: JSX.Element[] | JSX.Element;
|
|
onClose?: () => void;
|
|
reload?: boolean;
|
|
setReload?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
ref?: React.MutableRefObject<HTMLDialogElement | undefined>;
|
|
user?: TUser | null;
|
|
isAdd?: boolean;
|
|
}
|
|
|
|
export type { IMenusContext, IButton, ITable, ITableBody, IDialogProps };
|