New: Various UI Package Updates

This commit is contained in:
Qstick 2018-09-15 22:32:34 -04:00
parent 9611df7e9e
commit b8511f039a
13 changed files with 966 additions and 906 deletions

View file

@ -1,6 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { kinds } from 'Helpers/Props';
import classNames from 'classnames';
import styles from './Icon.css';

View file

@ -39,7 +39,7 @@ class Link extends Component {
let el = component;
if (to) {
if (/\w+?:\/\//.test(to)) {
if ((/\w+?:\/\//).test(to)) {
el = 'a';
linkProps.href = to;
linkProps.target = target || '_blank';

View file

@ -1,48 +1,40 @@
import React from 'react';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Grid } from 'react-virtualized';
import styles from './VirtualTableBody.css';
class VirtualTableBody extends Grid {
class VirtualTableBody extends Component {
//
// Render
render() {
const {
autoContainerWidth,
containerStyle
} = this.props;
const { isScrolling } = this.state;
const totalColumnsWidth = this._columnSizeAndPositionManager.getTotalSize();
const totalRowsHeight = this._rowSizeAndPositionManager.getTotalSize();
const childrenToDisplay = this._childrenToDisplay;
if (childrenToDisplay.length > 0) {
return (
<div className={styles.tableBodyContainer}>
<div
style={{
width: autoContainerWidth ? 'auto' : totalColumnsWidth,
height: totalRowsHeight,
maxWidth: totalColumnsWidth,
maxHeight: totalRowsHeight,
overflow: 'hidden',
pointerEvents: isScrolling ? 'none' : '',
...containerStyle
}}
>
{childrenToDisplay}
</div>
</div>
);
}
return (
<div />
<Grid
{...this.props}
style={{
boxSizing: undefined,
direction: undefined,
height: undefined,
position: undefined,
willChange: undefined,
overflow: undefined,
width: undefined
}}
containerStyle={{
position: undefined
}}
/>
);
}
}
VirtualTableBody.propTypes = {
className: PropTypes.string.isRequired
};
VirtualTableBody.defaultProps = {
className: styles.tableBodyContainer
};
export default VirtualTableBody;