UNPKG

ra-core

Version:

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

23 lines (20 loc) 569 B
import { createContext, useContext, type ReactNode, type FC } from 'react'; import { type Identifier } from '../types'; export const DataTableConfigContext = createContext<{ expand?: | ReactNode | FC<{ id: Identifier; record: any; resource: string; }>; expandSingle: boolean; hasBulkActions: boolean; hover?: boolean; }>({ expandSingle: false, hover: true, hasBulkActions: false, }); export const useDataTableConfigContext = () => useContext(DataTableConfigContext);