feat: replace inline SVG with radix-ui AccessibilityIcon
This commit is contained in:
@@ -59,8 +59,5 @@
|
||||
"typescript-eslint": "^8.58.2",
|
||||
"vite": "^6.4.2",
|
||||
"vite-plugin-dts": "^4.5.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@radix-ui/react-icons": "^1.3.2"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
-13
@@ -7,10 +7,6 @@ settings:
|
||||
importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
'@radix-ui/react-icons':
|
||||
specifier: ^1.3.2
|
||||
version: 1.3.2(react@19.2.5)
|
||||
devDependencies:
|
||||
'@eslint/js':
|
||||
specifier: ^10.0.1
|
||||
@@ -387,11 +383,6 @@ packages:
|
||||
'@microsoft/tsdoc@0.16.0':
|
||||
resolution: {integrity: sha512-xgAyonlVVS+q7Vc7qLW0UrJU7rSFcETRWsqdXZtjzRU8dF+6CkozTK4V4y1LwOX7j8r/vHphjDeMeGI4tNGeGA==}
|
||||
|
||||
'@radix-ui/react-icons@1.3.2':
|
||||
resolution: {integrity: sha512-fyQIhGDhzfc9pK2kH6Pl9c4BDJGfMkPqkyIgYDthyNYoNg3wVhoJMMh19WS4Up/1KMPFVpNsT2q3WmXn2N1m6g==}
|
||||
peerDependencies:
|
||||
react: ^16.x || ^17.x || ^18.x || ^19.0.0 || ^19.0.0-rc
|
||||
|
||||
'@rolldown/pluginutils@1.0.0-beta.27':
|
||||
resolution: {integrity: sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==}
|
||||
|
||||
@@ -1697,10 +1688,6 @@ snapshots:
|
||||
|
||||
'@microsoft/tsdoc@0.16.0': {}
|
||||
|
||||
'@radix-ui/react-icons@1.3.2(react@19.2.5)':
|
||||
dependencies:
|
||||
react: 19.2.5
|
||||
|
||||
'@rolldown/pluginutils@1.0.0-beta.27': {}
|
||||
|
||||
'@rollup/pluginutils@5.3.0(rollup@4.60.2)':
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { useState, useRef, useCallback } from "react";
|
||||
import { AccessibilityIcon } from "@radix-ui/react-icons";
|
||||
import { useA11yStore } from "../store";
|
||||
import { useA11yEffects } from "../useA11yEffects";
|
||||
import { AccessibilityPanel } from "./AccessibilityPanel";
|
||||
@@ -88,7 +87,17 @@ export function AccessibilityWidget({
|
||||
aria-haspopup="dialog"
|
||||
onClick={() => setOpen((v) => !v)}
|
||||
>
|
||||
<AccessibilityIcon aria-hidden="true" width="28" height="28" />
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
width="28"
|
||||
height="28"
|
||||
viewBox="0 0 15 15"
|
||||
fill="currentColor"
|
||||
>
|
||||
<path d="M7.5.877a6.623 6.623 0 1 1 0 13.246A6.623 6.623 0 0 1 7.5.877m0 .95a5.674 5.674 0 1 0 0 11.343a5.674 5.674 0 0 0-.002-11.345m2.953 3.484a.5.5 0 1 1 .26.965l-1.967.527V8.27c0 .602.88 3.427.88 3.427a.5.5 0 1 1-.966.26S7.92 9.126 7.868 9c-.048-.127-.218-.127-.218-.127h-.307c-.006 0-.174.002-.219.127c-.055.129-.788 2.94-.793 2.959a.5.5 0 1 1-.966-.259c.006-.017.881-2.83.881-3.43V6.8l-1.959-.524a.5.5 0 0 1 .26-.965s1.654.562 2.299.562h1.31c.642 0 2.282-.557 2.297-.562M7.5 2.87a1.125 1.125 0 1 1 0 2.25a1.125 1.125 0 0 1 0-2.25" />
|
||||
</svg>
|
||||
{activeCount > 0 && (
|
||||
<span
|
||||
className="a11y-badge"
|
||||
|
||||
Reference in New Issue
Block a user