UNPKG

@toolpad/core

Version:

Dashboard framework powered by Material UI.

42 lines 1.18 kB
import * as React from 'react'; import { DataSourceCache } from "./cache.js"; import type { DataModel, DataModelId, DataSource } from './types'; import { type CRUDLocaleText } from "./localeText.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; /** * Locale text for the component. */ localeText?: CRUDLocaleText; } /** * * 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 };