import { RaRecord } from '../../types'; /** * Hook to read the record from a RecordContext. * * Must be used within a such as provided by the * (e.g. as a descendent of or ) or within a * (e.g. as a descendent of or ) * * @example // basic usage * * import { useRecordContext } from 'ra-core'; * * const TitleField = () => { * const record = useRecordContext(); * return {record && record.title}; * }; * * @example // allow record override via props * * import { useRecordContext } from 'ra-core'; * * const TitleField = (props) => { * const record = useRecordContext(props); * return {record && record.title}; * }; * render(); * * @returns {RaRecord} A record object */ export declare const useRecordContext: = RaRecord>(props?: UseRecordContextParams) => RecordType | undefined; export interface UseRecordContextParams = RaRecord> { record?: RecordType; [key: string]: any; } //# sourceMappingURL=useRecordContext.d.ts.map