diff --git a/docs/components/grid/code.mdx b/docs/components/grid/code.mdx index 32ddc98f..a9e6f72f 100644 --- a/docs/components/grid/code.mdx +++ b/docs/components/grid/code.mdx @@ -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, }); ``` diff --git a/docs/home/migration/4_0_0/index.md b/docs/home/migration/4_0_0/index.md index 76c8aa5d..e779ef04 100644 --- a/docs/home/migration/4_0_0/index.md +++ b/docs/home/migration/4_0_0/index.md @@ -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, });