Fix tooltip max width on larger screens
This commit is contained in:
parent
3542ab86e9
commit
f4f2a6f5fc
|
@ -13,19 +13,15 @@ let maxWidth = null;
|
||||||
function getMaxWidth() {
|
function getMaxWidth() {
|
||||||
const windowWidth = window.innerWidth;
|
const windowWidth = window.innerWidth;
|
||||||
|
|
||||||
if (windowWidth > parseInt(dimensions.breakpointLarge)) {
|
if (windowWidth >= parseInt(dimensions.breakpointLarge)) {
|
||||||
maxWidth = 800;
|
maxWidth = 800;
|
||||||
}
|
} else if (windowWidth >= parseInt(dimensions.breakpointMedium)) {
|
||||||
|
|
||||||
if (windowWidth > parseInt(dimensions.breakpointMedium)) {
|
|
||||||
maxWidth = 650;
|
maxWidth = 650;
|
||||||
}
|
} else if (windowWidth >= parseInt(dimensions.breakpointSmall)) {
|
||||||
|
|
||||||
if (windowWidth > parseInt(dimensions.breakpointSmall)) {
|
|
||||||
maxWidth = 500;
|
maxWidth = 500;
|
||||||
|
} else {
|
||||||
|
maxWidth = 450;
|
||||||
}
|
}
|
||||||
|
|
||||||
maxWidth = 450;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Tooltip extends Component {
|
class Tooltip extends Component {
|
||||||
|
|
|
@ -140,7 +140,7 @@ EditRemotePathMappingModalContent.propTypes = {
|
||||||
isSaving: PropTypes.bool.isRequired,
|
isSaving: PropTypes.bool.isRequired,
|
||||||
saveError: PropTypes.object,
|
saveError: PropTypes.object,
|
||||||
item: PropTypes.shape(remotePathMappingShape).isRequired,
|
item: PropTypes.shape(remotePathMappingShape).isRequired,
|
||||||
downloadClientHosts: PropTypes.arrayOf(PropTypes.string).isRequired,
|
downloadClientHosts: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||||
onInputChange: PropTypes.func.isRequired,
|
onInputChange: PropTypes.func.isRequired,
|
||||||
onSavePress: PropTypes.func.isRequired,
|
onSavePress: PropTypes.func.isRequired,
|
||||||
onModalClose: PropTypes.func.isRequired,
|
onModalClose: PropTypes.func.isRequired,
|
||||||
|
|
Loading…
Reference in New Issue