Skip to content

Commit

Permalink
Clean up based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
mofojed committed Apr 30, 2024
1 parent 8f56be9 commit a050800
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/ErrorView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@

.btn-danger {
border-radius: 0;
color: $black;
color: var(--dh-color-contrast-dark);
opacity: 0.8;
padding: $spacer-1;
&:active {
color: $black;
color: var(--dh-color-contrast-dark);
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/ErrorView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ function ErrorView({
const textRef = useRef<HTMLPreElement>(null);

const handleResize = useCallback(() => {
if (isExpanded || textRef.current == null) {
if (isExpanded || isExpandedProp || textRef.current == null) {
return;
}
const newIsExpandable =
textRef.current.scrollHeight > textRef.current.clientHeight;
setIsExpandable(newIsExpandable);
}, [isExpanded]);
}, [isExpanded, isExpandedProp]);

const debouncedHandleResize = useDebouncedCallback(handleResize, 100);

Expand Down

0 comments on commit a050800

Please sign in to comment.