Fix broken UI package build (#1990)
* Use path instead of alias * Add missing pacakges * Use path in viewers * Use path in contextProviders * Add base to config * Add conditionals for window * Copy config to avoid breaking build * Update and lock versions * Update lock file * Remove scaling config * Fix broken versions of react date * Fix broken dev
This commit is contained in:
1 parent
e04f74499f
commit
ef163cd702
93 files changed
+3244
-297
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import React, { useState, useRef, useEffect } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classnames from 'classnames';
|
||||
import { Icon } from '@ohif/ui';
|
||||
import { Icon } from '../';
|
||||
|
||||
const DELAY_TO_SHOW = 1000;
|
||||
const DELAY_TO_HIDE = 10; // it needs at least a little delay to prevent tooltip to suddenly hide
|
||||
@@ -92,12 +92,20 @@ const TooltipClipboard = ({ children, text }) => {
|
||||
useEffect(() => {
|
||||
if (isActive) {
|
||||
refreshElementPosition();
|
||||
window.addEventListener('scroll', refreshElementPosition);
|
||||
if (typeof window !== 'undefined') {
|
||||
window.addEventListener('scroll', refreshElementPosition);
|
||||
}
|
||||
} else {
|
||||
window.removeEventListener('scroll', refreshElementPosition);
|
||||
if (typeof window !== 'undefined') {
|
||||
window.removeEventListener('scroll', refreshElementPosition);
|
||||
}
|
||||
}
|
||||
|
||||
return () => window.removeEventListener('scroll', refreshElementPosition);
|
||||
return () => {
|
||||
if (typeof window !== 'undefined') {
|
||||
window.removeEventListener('scroll', refreshElementPosition);
|
||||
}
|
||||
};
|
||||
}, [isActive]);
|
||||
|
||||
const onClickHandler = e => {
|
||||
|
||||
@@ -5,7 +5,7 @@ route: components/tooltipClipboard
|
||||
---
|
||||
|
||||
import { Playground, Props } from 'docz';
|
||||
import { TooltipClipboard } from '@ohif/ui';
|
||||
import { TooltipClipboard } from '../';
|
||||
|
||||
# Tooltip Clipboard
|
||||
|
||||
|
||||
Reference in new issue
Block a user