# GridTypeProvider

Provides application-wide type defaults for all descendant grids.

Wrap your application (or part of it) with this provider to make
type-level renderers and editors available to all DataGrid components.

```ts
const GridTypeProvider: FC<GridTypeProviderProps>
```

#### Example

```tsx
// App.tsx or main.tsx
import { GridTypeProvider, type TypeDefaultsMap } from '@toolbox-web/grid-react';

const typeDefaults: TypeDefaultsMap = {
  country: {
    renderer: (ctx) => <CountryBadge code={ctx.value} />,
    editor: (ctx) => (
      <CountrySelect
        value={ctx.value}
        onSelect={(v) => ctx.commit(v)}
      />
    )
  },
  date: {
    renderer: (ctx) => formatDate(ctx.value),
    editor: (ctx) => <DatePicker value={ctx.value} onCommit={ctx.commit} />
  }
};

function App() {
  return (
    <GridTypeProvider defaults={typeDefaults}>
      <Dashboard />
    </GridTypeProvider>
  );
}
```

Any DataGrid with columns using `type: 'country'` will automatically
use the registered renderer/editor.
