@hrnec06/react_utils 1.2.1 → 1.2.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.
package/package.json
CHANGED
|
@@ -182,7 +182,7 @@ export default function Debug({
|
|
|
182
182
|
|
|
183
183
|
const calculateScrollHeight = () => {
|
|
184
184
|
if (!containerRef.current) return 0;
|
|
185
|
-
|
|
185
|
+
|
|
186
186
|
return containerRef.current.scrollHeight - calculateContainerHeight();
|
|
187
187
|
}
|
|
188
188
|
|
|
@@ -206,7 +206,11 @@ export default function Debug({
|
|
|
206
206
|
const handleExpandChange = (path: string[], state: boolean) => {
|
|
207
207
|
if (!containerRef.current) return;
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
let newScrollProgress = minmax((scrollProgress * scrollHeight) / calculateScrollHeight(), 0, 1);
|
|
210
|
+
if (isNaN(newScrollProgress))
|
|
211
|
+
newScrollProgress = 0;
|
|
212
|
+
|
|
213
|
+
setScrollProgress(newScrollProgress);
|
|
210
214
|
|
|
211
215
|
updateScrollHeight();
|
|
212
216
|
}
|
|
@@ -34,7 +34,7 @@ export default function ParseValueSimple({
|
|
|
34
34
|
if (className === null || className.length > MAX_LENGTH)
|
|
35
35
|
return <ValueKeyword value="object" />
|
|
36
36
|
|
|
37
|
-
return className;
|
|
37
|
+
return (<span className="text-white">{className}</span>);
|
|
38
38
|
}
|
|
39
39
|
case 'string': {
|
|
40
40
|
if (value.length > MAX_LENGTH)
|
|
@@ -53,7 +53,7 @@ export default function ValueObject({
|
|
|
53
53
|
<Chevron_Toggle expanded={expanded} onToggle={handleExpand} />
|
|
54
54
|
|
|
55
55
|
{
|
|
56
|
-
Object.getPrototypeOf(value) !== Object.prototype && <span>({value.constructor.name}) </span>
|
|
56
|
+
Object.getPrototypeOf(value) !== Object.prototype && <span className="text-white">({value.constructor.name}) </span>
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
{
|