goobs-frontend
Version:
A comprehensive React-based libary for building modern web applications
54 lines • 1.74 kB
TypeScript
import { FC } from 'react';
import { ButtonProps } from '../../Button';
import { DataGridStyles } from '../types';
/**
* Props for the DataGridToolbar component.
*/
export interface DataGridToolbarProps {
/** Custom action buttons to display on the left side */
buttons?: ButtonProps[];
/**
* Props for the ManageRow component (right side).
* Controls CRUD actions for selected rows.
*/
manageRowProps?: {
/** Currently selected row IDs */
selectedRows?: string[];
/** Full row data (for context) */
rows?: Array<{
[key: string]: unknown;
}>;
/** Handler for Add action */
onAdd?: () => void;
/** Handler for Duplicate action */
onDuplicate?: () => void;
/** Handler for Delete action */
onDelete?: () => void;
/** Handler for Manage (edit) action */
onManage?: () => void;
/** Handler for Show (view) action */
onShow?: () => void;
/** Handler for Export action */
onExport?: () => void;
/** Handler for closing manage row UI */
handleClose?: () => void;
/** Permission level */
permissions?: {
access: 'no-access' | 'read' | 'write';
} | undefined;
};
/** Theme and style configuration */
styles?: DataGridStyles;
/** Permission level for filtering buttons */
permissions?: {
access: 'no-access' | 'read' | 'write';
} | undefined;
}
/**
* DATAGRID TOOLBAR COMPONENT
* --------------------------
* Renders the action toolbar above the data table.
*/
declare const DataGridToolbar: FC<DataGridToolbarProps>;
export default DataGridToolbar;
//# sourceMappingURL=index.d.ts.map