UNPKG

@toolpad/core

Version:

Dashboard framework powered by Material UI.

61 lines 1.61 kB
import * as React from 'react'; import { DataSourceCache } from "./cache.js"; import type { DataModel, DataModelId, DataSource } from "./types.js"; import { type CRUDLocaleText } from "./localeText.js"; import { type PageContainerProps } from "../PageContainer/index.js"; export interface ShowProps<D extends DataModel> { id: DataModelId; /** * Server-side [data source](https://mui.com/toolpad/core/react-crud/#data-sources). */ dataSource?: DataSource<D> & Required<Pick<DataSource<D>, 'getOne'>>; /** * Callback fired when the "Edit" button is clicked. */ onEditClick?: (id: DataModelId) => void; /** * Callback fired when the item is successfully deleted. */ onDelete?: (id: DataModelId) => void; /** * [Cache](https://mui.com/toolpad/core/react-crud/#data-caching) for the data source. */ dataSourceCache?: DataSourceCache | null; /** * The title of the page. */ pageTitle?: string; /** * Locale text for the component. */ localeText?: CRUDLocaleText; /** * The components used for each slot inside. * @default {} */ slots?: { pageContainer?: React.JSXElementConstructor<PageContainerProps>; }; /** * The props used for each slot inside. * @default {} */ slotProps?: { pageContainer?: PageContainerProps; }; } /** * * Demos: * * - [CRUD](https://mui.com/toolpad/core/react-crud/) * * API: * * - [Show API](https://mui.com/toolpad/core/api/show) */ declare function Show<D extends DataModel>(props: ShowProps<D>): React.JSX.Element; declare namespace Show { var propTypes: any; } export { Show };