import { ReactElement } from 'react'; import PropTypes from 'prop-types'; import { Identifier, SortPayload, Exporter } from '../../features/core'; import { ToolbarProps } from '@mui/material'; /** * Action Toolbar for the List view * * Internal component. If you want to add or remove actions for a List view, * write your own ListActions Component. Then, in the component, * use it in the `actions` prop to pass a custom component. * * @example * import { cloneElement } from 'react'; * import Button from '@mui/material/Button'; * import { TopToolbar, List, CreateButton, ExportButton } from '../../app'; * * const PostListActions = ({ basePath, filters }) => ( * * { cloneElement(filters, { context: 'button' }) } * * * // Add your custom actions here // * * * ); * * export const PostList = (props) => ( * } {...props}> * ... * * ); */ declare const ListActions: { (props: ListActionsProps): JSX.Element; propTypes: { basePath: PropTypes.Requireable; className: PropTypes.Requireable; currentSort: PropTypes.Requireable; displayedFilters: PropTypes.Requireable; exporter: PropTypes.Requireable any)>; filters: PropTypes.Requireable; filterValues: PropTypes.Requireable; hasCreate: PropTypes.Requireable; resource: PropTypes.Requireable; onUnselectItems: PropTypes.Validator<(...args: any[]) => any>; selectedIds: PropTypes.Requireable; showFilter: PropTypes.Requireable<(...args: any[]) => any>; total: PropTypes.Requireable; }; defaultProps: { selectedIds: any[]; onUnselectItems: () => any; }; }; export interface ListActionsProps extends ToolbarProps { currentSort?: SortPayload; className?: string; resource?: string; filters?: ReactElement; displayedFilters?: any; exporter?: Exporter | boolean; filterValues?: any; permanentFilter?: any; hasCreate?: boolean; basePath?: string; selectedIds?: Identifier[]; onUnselectItems?: () => void; showFilter?: (filterName: string, defaultValue: any) => void; total?: number; } export default ListActions;