Completely updated React, fixed #11, (hopefully)

This commit is contained in:
2018-03-04 19:11:49 -05:00
parent 6e0afd6e2a
commit 34e5f5139a
13674 changed files with 333464 additions and 473223 deletions

View File

@@ -1,11 +1,9 @@
// @flow weak
import React from 'react';
import type { Node } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
export const styles = (theme: Object) => ({
export const styles = theme => ({
root: {
position: 'relative',
display: 'flex',
@@ -15,30 +13,7 @@ export const styles = (theme: Object) => ({
gutters: theme.mixins.gutters({}),
});
type ProvidedProps = {
classes: Object,
};
export type Props = {
/**
* Useful to extend the style applied to components.
*/
classes?: Object,
/**
* Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.
*/
children?: Node,
/**
* @ignore
*/
className?: string,
/**
* If `true`, disables gutter padding.
*/
disableGutters?: boolean,
};
function Toolbar(props: ProvidedProps & Props) {
function Toolbar(props) {
const { children, classes, className: classNameProp, disableGutters, ...other } = props;
const className = classNames(
@@ -56,6 +31,25 @@ function Toolbar(props: ProvidedProps & Props) {
);
}
Toolbar.propTypes = {
/**
* Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.
*/
children: PropTypes.node,
/**
* Useful to extend the style applied to components.
*/
classes: PropTypes.object.isRequired,
/**
* @ignore
*/
className: PropTypes.string,
/**
* If `true`, disables gutter padding.
*/
disableGutters: PropTypes.bool,
};
Toolbar.defaultProps = {
disableGutters: false,
};