New: Custom Filtering for UI (#234)

This commit is contained in:
Qstick 2018-03-14 21:28:46 -04:00 committed by GitHub
parent c6873014c7
commit 7354e02bff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
154 changed files with 3498 additions and 1370 deletions

View file

@ -13,4 +13,8 @@
background-color: inherit;
color: $iconButtonHoverColor;
}
&.isDisabled {
color: $iconButtonDisabledColor;
}
}

View file

@ -1,5 +1,6 @@
import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';
import Icon from 'Components/Icon';
import Link from './Link';
import styles from './IconButton.css';
@ -12,12 +13,18 @@ function IconButton(props) {
kind,
size,
isSpinning,
isDisabled,
...otherProps
} = props;
return (
<Link
className={className}
className={classNames(
className,
isDisabled && styles.isDisabled
)}
isDisabled={isDisabled}
{...otherProps}
>
<Icon
@ -37,7 +44,8 @@ IconButton.propTypes = {
kind: PropTypes.string,
name: PropTypes.object.isRequired,
size: PropTypes.number,
isSpinning: PropTypes.bool
isSpinning: PropTypes.bool,
isDisabled: PropTypes.bool
};
IconButton.defaultProps = {

View file

@ -10,7 +10,7 @@
cursor: pointer;
&:global(.isDisabled) {
pointer-events: none;
cursor: default;
}
}