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,45 @@
import * as React from 'react';
import { StandardProps } from '..';
export interface PaperProps extends StandardProps<
React.HTMLAttributes<HTMLDivElement>,
PaperClassKey
> {
component?: React.ReactType;
elevation?: number;
square?: boolean;
}
export type PaperClassKey =
| 'root'
| 'rounded'
| 'shadow0'
| 'shadow1'
| 'shadow2'
| 'shadow3'
| 'shadow4'
| 'shadow5'
| 'shadow6'
| 'shadow7'
| 'shadow8'
| 'shadow9'
| 'shadow10'
| 'shadow11'
| 'shadow12'
| 'shadow13'
| 'shadow14'
| 'shadow15'
| 'shadow16'
| 'shadow17'
| 'shadow18'
| 'shadow19'
| 'shadow20'
| 'shadow21'
| 'shadow22'
| 'shadow23'
| 'shadow24'
;
declare const Paper: React.ComponentType<PaperProps>;
export default Paper;

View File

@@ -0,0 +1,55 @@
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 warning from 'warning';
import withStyles from '../styles/withStyles';
export const styles = theme => {
const shadows = {};
theme.shadows.forEach((shadow, index) => {
shadows[`shadow${index}`] = {
boxShadow: shadow
};
});
return _extends({
root: {
backgroundColor: theme.palette.background.paper
},
rounded: {
borderRadius: 2
}
}, shadows);
};
function Paper(props) {
const {
classes,
className: classNameProp,
component: ComponentProp,
square,
elevation
} = props,
other = _objectWithoutProperties(props, ['classes', 'className', 'component', 'square', 'elevation']);
warning(elevation >= 0 && elevation < 25, `Material-UI: this elevation \`${elevation}\` is not implemented.`);
const className = classNames(classes.root, classes[`shadow${elevation >= 0 ? elevation : 0}`], {
[classes.rounded]: !square
}, classNameProp);
return React.createElement(ComponentProp, _extends({ className: className }, other));
}
Paper.defaultProps = {
component: 'div',
elevation: 2,
square: false
};
export default withStyles(styles, { name: 'MuiPaper' })(Paper);

View File

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

View File

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