Completely updated React, fixed #11, (hopefully)
This commit is contained in:
54
goTorrentWebUI/node_modules/material-ui/Dialog/DialogTitle.js.flow
generated
vendored
54
goTorrentWebUI/node_modules/material-ui/Dialog/DialogTitle.js.flow
generated
vendored
@@ -1,12 +1,10 @@
|
||||
// @flow
|
||||
|
||||
import React from 'react';
|
||||
import type { Node } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import withStyles from '../styles/withStyles';
|
||||
import Typography from '../Typography';
|
||||
|
||||
export const styles = (theme: Object) => ({
|
||||
export const styles = theme => ({
|
||||
root: {
|
||||
margin: 0,
|
||||
padding: `${theme.spacing.unit * 3}px ${theme.spacing.unit * 3}px \
|
||||
@@ -15,40 +13,36 @@ export const styles = (theme: Object) => ({
|
||||
},
|
||||
});
|
||||
|
||||
type ProvidedProps = {
|
||||
classes: Object,
|
||||
};
|
||||
|
||||
export type Props = {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children?: Node,
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes?: Object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className?: string,
|
||||
/**
|
||||
* If `true`, the children won't be wrapped by a typography component.
|
||||
* For instance, that can be useful to can render an h4 instead of a
|
||||
*/
|
||||
disableTypography?: boolean,
|
||||
};
|
||||
|
||||
function DialogTitle(props: ProvidedProps & Props) {
|
||||
function DialogTitle(props) {
|
||||
const { children, classes, className, disableTypography, ...other } = props;
|
||||
|
||||
return (
|
||||
<div data-mui-test="DialogTitle" className={classNames(classes.root, className)} {...other}>
|
||||
{disableTypography ? children : <Typography type="title">{children}</Typography>}
|
||||
{disableTypography ? children : <Typography variant="title">{children}</Typography>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
DialogTitle.propTypes = {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children: PropTypes.node.isRequired,
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* If `true`, the children won't be wrapped by a typography component.
|
||||
* For instance, this can be useful to render an h4 instead of the default h2.
|
||||
*/
|
||||
disableTypography: PropTypes.bool,
|
||||
};
|
||||
|
||||
DialogTitle.defaultProps = {
|
||||
disableTypography: false,
|
||||
};
|
||||
|
Reference in New Issue
Block a user