@nexusui/components
Version:
These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.
28 lines (27 loc) • 1.07 kB
TypeScript
import { GridActionsCellItemProps, GridColDef } from '@mui/x-data-grid';
export declare enum FileAction {
Download = "download",
Edit = "edit",
Remove = "remove",
Open = "open",
Share = "share",
Folder = "folder"
}
export interface FileRowData {
id: string;
name: string;
owner: string;
updatedTime: string;
size: number;
path?: string;
isFolder?: boolean;
isSubFile?: boolean;
icon?: React.ReactNode;
}
export type FileActionFuncType<T extends FileRowData> = (row: T, action: string) => void;
export interface FileRowActionCellProps<T extends FileRowData> {
row: T;
onAction: FileActionFuncType<T>;
}
export type FileRowActionsGeneratorType<T extends FileRowData> = (props: FileRowActionCellProps<T>) => GridActionsCellItemProps[];
export type FilColumnGeneratorType = <T extends FileRowData>(rowActionGenerator: FileRowActionsGeneratorType<T>, t: (key: string) => string, isMobile: boolean, onAction: FileActionFuncType<T>, onShowBottomSheet: (sheetItems: React.ReactNode) => void) => GridColDef<T>[];