Added logging, changed some directory structure

This commit is contained in:
2018-01-13 21:33:40 -05:00
parent f079a5f067
commit 8e72ffb917
73656 changed files with 35284 additions and 53718 deletions

View File

@@ -0,0 +1,23 @@
import * as React from 'react';
import { StandardProps, PropTypes } from '..';
export interface IconProps extends StandardProps<
React.HTMLAttributes<HTMLSpanElement>,
IconClassKey
> {
color?: PropTypes.Color | 'action' | 'contrast' | 'disabled' | 'error';
}
export type IconClassKey =
| 'root'
| 'colorAccent'
| 'colorAction'
| 'colorContrast'
| 'colorDisabled'
| 'colorError'
| 'colorPrimary'
;
declare const Icon: React.ComponentType<IconProps>;
export default Icon;

View File

@@ -0,0 +1,56 @@
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
import React from 'react';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
import { capitalizeFirstLetter } from '../utils/helpers';
export const styles = theme => ({
root: {
userSelect: 'none'
},
colorAccent: {
color: theme.palette.secondary.A200
},
colorAction: {
color: theme.palette.action.active
},
colorContrast: {
color: theme.palette.getContrastText(theme.palette.primary[500])
},
colorDisabled: {
color: theme.palette.action.disabled
},
colorError: {
color: theme.palette.error[500]
},
colorPrimary: {
color: theme.palette.primary[500]
}
});
function Icon(props) {
const { children, classes, className: classNameProp, color } = props,
other = _objectWithoutProperties(props, ['children', 'classes', 'className', 'color']);
const className = classNames('material-icons', classes.root, {
[classes[`color${capitalizeFirstLetter(color)}`]]: color !== 'inherit'
}, classNameProp);
return React.createElement(
'span',
_extends({ className: className, 'aria-hidden': 'true' }, other),
children
);
}
Icon.defaultProps = {
color: 'inherit'
};
Icon.muiName = 'Icon';
export default withStyles(styles, { name: 'MuiIcon' })(Icon);

View File

@@ -0,0 +1,2 @@
export { default } from './Icon';
export * from './Icon';

View File

@@ -0,0 +1 @@
export { default } from './Icon';