@umijs/plugin-docs 4.0.1 → 4.0.2

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.
@@ -48,7 +48,7 @@ function NavItem(props: NavItemProps) {
48
48
  <a href={nav.path} target="_blank">
49
49
  <span className="flex">
50
50
  {nav.title}
51
- <img src={ExternalLink} alt="ExternalLink" />
51
+ <img className="link-icon" src={ExternalLink} alt="ExternalLink" />
52
52
  </span>
53
53
  </a>
54
54
  ) : (
@@ -77,7 +77,11 @@ function NavItem(props: NavItemProps) {
77
77
  >
78
78
  {nav.title}
79
79
  </span>
80
- <img src={ExternalLink} alt="ExternalLink" />
80
+ <img
81
+ className="link-icon"
82
+ src={ExternalLink}
83
+ alt="ExternalLink"
84
+ />
81
85
  </span>
82
86
  </a>
83
87
  ) : (
@@ -39,6 +39,10 @@ export default () => {
39
39
  '--color-scheme',
40
40
  'light',
41
41
  );
42
+ // @ts-ignore
43
+ document.querySelectorAll('.link-icon')?.forEach((el: HTMLElement) => {
44
+ el.style.setProperty('filter', 'invert(0)');
45
+ });
42
46
  } else {
43
47
  document.body.classList.add('dark');
44
48
  localStorage.setItem('theme', 'dark');
@@ -46,6 +50,10 @@ export default () => {
46
50
  '--color-scheme',
47
51
  'dark',
48
52
  );
53
+ // @ts-ignore
54
+ document.querySelectorAll('.link-icon')?.forEach((el: HTMLElement) => {
55
+ el.style.setProperty('filter', 'invert(1)');
56
+ });
49
57
  }
50
58
  }, [toggle]);
51
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/plugin-docs",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "@umijs/plugin-docs",
5
5
  "homepage": "https://github.com/umijs/umi-next/tree/master/packages/plugin-docs#readme",
6
6
  "bugs": "https://github.com/umijs/umi-next/issues",
@@ -21,7 +21,7 @@
21
21
  "build:css": "tailwindcss -i ./client/theme-doc/tailwind.css -o ./client/theme-doc/tailwind.out.css",
22
22
  "build:deps": "umi-scripts bundleDeps",
23
23
  "build:extra": "pnpm build:css",
24
- "dev": "pnpm build -- --watch",
24
+ "dev": "pnpm build --watch",
25
25
  "dev:css": "pnpm build:css -- --watch",
26
26
  "test": "umi-scripts jest-turbo"
27
27
  },
@@ -39,7 +39,7 @@
39
39
  "rehype-slug": "5.0.1",
40
40
  "remark-gfm": "^3.0.1",
41
41
  "tailwindcss": "^3.0.24",
42
- "umi": "4.0.1"
42
+ "umi": "4.0.2"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"