Skip to content

GridProvider

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.

const GridProvider: FC<GridProviderProps>
// App.tsx or main.tsx
import { GridProvider } from '@toolbox-web/grid-react';
const typeDefaults = {
country: { renderer: (ctx) => <CountryBadge value={ctx.value} /> },
status: { renderer: (ctx) => <StatusBadge value={ctx.value} /> },
};
const icons = {
expand: '',
collapse: '',
};
function App() {
return (
<GridProvider defaults={typeDefaults} icons={icons}>
<Dashboard />
</GridProvider>
);
}
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt