import { GridIcons } from '@toolbox-web/grid'; import { FC, ReactNode } from 'react'; import { TypeDefaultsMap } from './grid-type-registry'; /** * Props for the GridProvider component. */ export interface GridProviderProps { /** * Icon overrides to provide to all descendant grids. * Optional - only specify if you want to customize icons. * * @example * ```tsx * icons={{ * expand: '➕', * collapse: '➖', * sortAsc: '↑', * sortDesc: '↓', * }} * ``` */ icons?: Partial; /** * Type-level default renderers and editors. * Optional - only specify if you want custom type defaults. * * @example * ```tsx * defaults={{ * country: { * renderer: (ctx) => , * editor: (ctx) => * }, * date: { * renderer: (ctx) => formatDate(ctx.value), * } * }} * ``` */ defaults?: TypeDefaultsMap; children: ReactNode; } /** * Combined provider for application-wide grid configuration. * * This component wraps both `GridTypeProvider` and `GridIconProvider` to reduce * nesting in your component tree. All props are optional - only provide what you need. * * @example * ```tsx * // App.tsx or main.tsx * import { GridProvider } from '@toolbox-web/grid-react'; * * const typeDefaults = { * country: { renderer: (ctx) => }, * status: { renderer: (ctx) => }, * }; * * const icons = { * expand: '➕', * collapse: '➖', * }; * * function App() { * return ( * * * * ); * } * ``` * * @example * ```tsx * // Icons only * * * * ``` * * @example * ```tsx * // Type defaults only * formatDate(ctx.value) } }}> * * * ``` */ export declare const GridProvider: FC; //# sourceMappingURL=grid-provider.d.ts.map