Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions docs/components/grid/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,22 @@ npm install @siemens/ix-aggrid
Import and configure the IX theme:

```javascript
import { useIxTheme } from '@siemens/ix-aggrid';
import { getIxTheme } from '@siemens/ix-aggrid';
import { provideGlobalGridOptions } from 'ag-grid-community';

const ixTheme = await useIxTheme(() => import('ag-grid-community'));
// Get iX theme based on your ag-grid module
const ixTheme = await getIxTheme(() => import('ag-grid-community'));

// Set the theme in your grid options
const gridOptions = {
theme: ixTheme,
// Rest of options
};

// Or set the theme globally for all grids
// Make sure to do this before initializing any grid
provideGlobalGridOptions({
theme: ixTheme
theme: ixTheme,
});
```

Expand Down
13 changes: 11 additions & 2 deletions docs/home/migration/4_0_0/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,20 @@ Migration steps:

3. Configure the theme using the new theming API
```javascript
import { useIxTheme } from '@siemens/ix-aggrid';
import { getIxTheme } from '@siemens/ix-aggrid';
import { provideGlobalGridOptions } from 'ag-grid-community';

const ixTheme = await useIxTheme(() => import('ag-grid-community'));
// Get iX theme based on your ag-grid module
const ixTheme = await getIxTheme(() => import('ag-grid-community'));

// Set the theme in your grid options
const gridOptions = {
theme: ixTheme,
// Rest of options
};

// Or set the theme globally for all grids
// Make sure to do this before initializing any grid
provideGlobalGridOptions({
theme: ixTheme,
});
Expand Down