@itwin/itwinui-react 2.6.0 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c5cfa4c: Fixed an issue with incremental migration where adding a close button to v2 Toaster was breaking v1 styles for the whole page.
8
+
3
9
  ## 2.6.0
4
10
 
5
11
  ### Minor Changes
@@ -27,6 +27,11 @@ const useTheme = (theme, themeOptions) => {
27
27
  if (!ownerDocument || isThemeAlreadySet.current) {
28
28
  return;
29
29
  }
30
+ // do nothing if using v1 for the main page (incremental migration)
31
+ if (ownerDocument.documentElement.className.includes('iui-theme-') ||
32
+ ownerDocument.body.classList.contains('iui-body')) {
33
+ return;
34
+ }
30
35
  ownerDocument.body.classList.toggle('iui-root', true);
31
36
  switch (theme) {
32
37
  case 'light':
@@ -24,6 +24,11 @@ export const useTheme = (theme, themeOptions) => {
24
24
  if (!ownerDocument || isThemeAlreadySet.current) {
25
25
  return;
26
26
  }
27
+ // do nothing if using v1 for the main page (incremental migration)
28
+ if (ownerDocument.documentElement.className.includes('iui-theme-') ||
29
+ ownerDocument.body.classList.contains('iui-body')) {
30
+ return;
31
+ }
27
32
  ownerDocument.body.classList.toggle('iui-root', true);
28
33
  switch (theme) {
29
34
  case 'light':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-react",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "main": "cjs/index.js",