import * as React from 'react'; import { type ComponentsOverrides, type SxProps, type Theme } from '@mui/material/styles'; import type { ReactElement, ReactNode, ElementType } from 'react'; import { type RaRecord } from 'ra-core'; import { ListProps } from './List'; export declare const ListView: (props: ListViewProps) => React.JSX.Element | null; export interface ListViewProps { /** * The actions to display in the toolbar. defaults to Filter + Create + Export. * * @see https://marmelab.com/react-admin/List.html#actions * @example * import { * CreateButton, * DatagridConfigurable, * ExportButton, * FilterButton, * List, * SelectColumnsButton, * TopToolbar, * } from 'react-admin'; * import IconEvent from '@mui/icons-material/Event'; * * const ListActions = () => ( * * * * * * * ); * * export const PostList = () => ( * }> * * ... * * * ); */ actions?: ReactElement | false; /** * The content to render as a sidebar. * @see https://marmelab.com/react-admin/List.html#aside * @example * import { List, useListContext } from 'react-admin'; * import { Typography } from '@mui/material'; * * const Aside = () => { * const { data, isPending } = useListContext(); * if (isPending) return null; * return ( *
* Posts stats * * Total views: {data.reduce((sum, post) => sum + post.views, 0)} * *
* ); * }; * * const PostList = () => ( * }> * ... * * ); */ aside?: ReactElement; /** * A class name to apply to the root div element */ className?: string; /** * The components rendering the list of records. Usually a or . * * @see https://marmelab.com/react-admin/List.html#children * @example * import { List, Datagrid, TextField, DateField, NumberField, BooleanField, ReferenceManyCount } from 'react-admin'; * * export const BookList = () => ( * * * * * * * * * * * ); */ children: ReactNode; /** * The component used to display the list. Defaults to . * * @see https://marmelab.com/react-admin/List.html#component * @example * import { List } from 'react-admin'; * * const PostList = () => ( * * ... * * ); */ component?: ElementType; /** * The component to display when the list is empty. * * @see https://marmelab.com/react-admin/List.html#empty * @example * import { CreateButton, List } from 'react-admin'; * import { Box, Button, Typography } from '@mui/material'; * * const Empty = () => ( * * * No products available * * * Create one or import products from a file * * * * * ); * * const ProductList = () => ( * }> * ... * * ); */ empty?: ReactElement | false; /** * Set to true to return null while the list is loading. * * @see https://marmelab.com/react-admin/List.html#emptywhileloading * @example * import { List } from 'react-admin'; * import { SimpleBookList } from './BookList'; * * const BookList = () => ( * * * * ); */ emptyWhileLoading?: boolean; /** * The filter inputs to display in the toolbar. * * @see https://marmelab.com/react-admin/List.html#filters * @example * import { List, TextInput } from 'react-admin'; * * const postFilters = [ * , * , * ]; * * export const PostList = () => ( * * ... * * ); */ filters?: ReactElement | ReactElement[]; /** * The pagination component to display. defaults to * * @see https://marmelab.com/react-admin/List.html#pagination * @example * import { Pagination, List } from 'react-admin'; * * const PostPagination = props => ; * * export const PostList = () => ( * }> * ... * * ); */ pagination?: ReactElement | false; /** * The page title (main title) to display above the data. Defaults to the humanized resource name. * * @see https://marmelab.com/react-admin/List.html#title * @example * import { List } from 'react-admin'; * * export const PostList = () => ( * * ... * * ); */ title?: string | ReactElement | false; /** * The CSS styles to apply to the component. * * @see https://marmelab.com/react-admin/List.html#sx-css-api * @example * const PostList = () => ( * * ... * * ); */ sx?: SxProps; } export declare const ListClasses: { main: string; content: string; actions: string; noResults: string; }; declare module '@mui/material/styles' { interface ComponentNameToClassKey { RaList: 'root' | 'main' | 'content' | 'actions' | 'noResults'; } interface ComponentsPropsList { RaList: Partial; } interface Components { RaList?: { defaultProps?: ComponentsPropsList['RaList']; styleOverrides?: ComponentsOverrides>['RaList']; }; } } //# sourceMappingURL=ListView.d.ts.map