ra-core
Version:
Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React
20 lines • 664 B
TypeScript
import * as React from 'react';
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, any> = any>({ render, }: WithRecordProps<RecordType>) => React.JSX.Element | null;
export interface WithRecordProps<RecordType extends Record<string, any> = any> {
render: (record: RecordType) => ReactNode;
label?: string;
}
//# sourceMappingURL=WithRecord.d.ts.map