Skip to content

Commit

Permalink
feat: Add TypeScript types for <Hyperlink> (#3077)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald authored and PKulkoRaccoonGang committed Aug 5, 2024
1 parent 223c9bd commit 2b95727
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Hyperlink/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Hyperlink.propTypes = {
* loaded into the same browsing context as the current one.
* If the target is `_blank` (opening a new window) `rel='noopener'` will be added to the anchor tag to prevent
* any potential [reverse tabnabbing attack](https://www.owasp.org/index.php/Reverse_Tabnabbing).
*/
*/
target: PropTypes.oneOf(['_blank', '_self']),
/** specifies the callback function when the link is clicked */
onClick: PropTypes.func,
Expand Down
4 changes: 4 additions & 0 deletions src/setupTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ class ResizeObserver {
}

window.ResizeObserver = ResizeObserver;

(window as any).crypto = {
getRandomValues: (arr: any) => crypto.randomBytes(arr.length),
};

0 comments on commit 2b95727

Please sign in to comment.