Skip to content

Commit

Permalink
feat: Add TypeScript types for <Overlay>, <OverlayTrigger>, <Tooltip>…
Browse files Browse the repository at this point in the history
…, <IconButton> (#3100)

* feat: add typings for <Overlay> and <OverlayTrigger>

* feat: add typings for <Tooltip>

* feat: add typings for <IconButton>

* chore: typing cleanups for <Chip> code

* feat: slightly more detailed types for <Chip/ChipIcon> - per review
  • Loading branch information
bradenmacdonald authored and PKulkoRaccoonGang committed Aug 1, 2024
1 parent 2327829 commit ee0a5c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/setupTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,3 @@ class ResizeObserver {
}

window.ResizeObserver = ResizeObserver;

(window as any).crypto = {
getRandomValues: (arr: any) => crypto.randomBytes(arr.length),
};
4 changes: 2 additions & 2 deletions www/src/components/css-utilities-table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { colorCSSDeclaration } from './utils';

function CSSUtilitiesTable({ selectors }: CSSUtilities) {
const [showPopover, setShowPopover] = useState<boolean>(false);
const [popoverTarget, setPopoverTarget] = useState<EventTarget | undefined>(undefined);
const [popoverTarget, setPopoverTarget] = useState<HTMLElement | undefined>(undefined);
const [computedStyle, setComputedStyle] = useState<string>('');

useEffect(() => {
Expand All @@ -21,7 +21,7 @@ function CSSUtilitiesTable({ selectors }: CSSUtilities) {
}, []);

const handleCSSVariableMouseEnter = (e: React.MouseEvent, declaration: string) => {
setPopoverTarget(e.target);
setPopoverTarget(e.target as HTMLElement);
setShowPopover(true);

const propertyName = declaration.split(':')[0];
Expand Down

0 comments on commit ee0a5c7

Please sign in to comment.