UNPKG

ra-core

Version:

Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React

19 lines 627 B
import { ReactNode } from 'react'; /** * Render prop version of useRecordContext * * @example * const BookShow = () => ( * <Show> * <SimpleShowLayout> * <WithRecord render={record => <span>{record.title}</span>} /> * </SimpleShowLayout> * </Show> * ); */ export declare const WithRecord: <RecordType extends Record<string, unknown> = any>({ render, }: WithRecordProps<RecordType>) => JSX.Element; export interface WithRecordProps<RecordType extends Record<string, unknown> = any> { render: (record: RecordType) => ReactNode; label?: string; } //# sourceMappingURL=WithRecord.d.ts.map