@recharts/devtools 0.0.11 → 0.0.12
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.
|
@@ -42,6 +42,7 @@ export const RechartsDevtools = () => {
|
|
|
42
42
|
const portalId = contextId ?? RECHARTS_DEVTOOLS_PORTAL_ID;
|
|
43
43
|
const { selectedInspectorId, setSelectedInspectorId, selectedInspector } = useSelectedInspector();
|
|
44
44
|
const [container, setContainer] = React.useState(null);
|
|
45
|
+
const selectId = React.useId();
|
|
45
46
|
React.useEffect(() => {
|
|
46
47
|
const el = document.getElementById(portalId);
|
|
47
48
|
setContainer(el);
|
|
@@ -66,8 +67,8 @@ export const RechartsDevtools = () => {
|
|
|
66
67
|
borderBottom: '1px solid #ccc',
|
|
67
68
|
} },
|
|
68
69
|
React.createElement("div", { style: { display: 'flex', alignItems: 'center', marginBottom: '4px', gap: '8px' } },
|
|
69
|
-
React.createElement("label",
|
|
70
|
-
React.createElement("select", { value: selectedInspectorId, onChange: (e) => setSelectedInspectorId(e.target.value), style: { padding: '4px' } }, Object.keys(INSPECTORS).map((key) => (React.createElement("option", { key: key, value: key }, key)))),
|
|
70
|
+
React.createElement("label", { htmlFor: selectId }, "Inspect Hook:"),
|
|
71
|
+
React.createElement("select", { id: selectId, value: selectedInspectorId, onChange: (e) => setSelectedInspectorId(e.target.value), style: { padding: '4px' } }, Object.keys(INSPECTORS).map((key) => (React.createElement("option", { key: key, value: key }, key)))),
|
|
71
72
|
Overlay && (React.createElement("div", { style: { marginTop: '4px' } },
|
|
72
73
|
React.createElement("label", { style: { cursor: 'pointer', display: 'flex', alignItems: 'center' } },
|
|
73
74
|
React.createElement("input", { type: "checkbox", checked: isOverlayEnabled, onChange: (e) => setIsOverlayEnabled(e.target.checked), style: { marginRight: '4px' } }),
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*
|
|
4
4
|
* In browsers without session storage support, it will fallback to `useState`.
|
|
5
5
|
*/
|
|
6
|
-
export declare const useSessionStorageState: <T>(id: string, initialState: T) =>
|
|
6
|
+
export declare const useSessionStorageState: <T>(id: string, initialState: T) => [state: T, setState: (newState: T) => void];
|