Completely updated React, fixed #11, (hopefully)
This commit is contained in:
56
goTorrentWebUI/node_modules/material-ui/Card/CardActions.js.flow
generated
vendored
56
goTorrentWebUI/node_modules/material-ui/Card/CardActions.js.flow
generated
vendored
@@ -1,7 +1,5 @@
|
||||
// @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 { cloneChildrenWithClassName } from '../utils/reactHelpers';
|
||||
@@ -12,48 +10,42 @@ export const styles = {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
padding: '2px 4px',
|
||||
boxSizing: 'border-box',
|
||||
},
|
||||
actionSpacing: {
|
||||
action: {
|
||||
margin: '0 4px',
|
||||
},
|
||||
};
|
||||
|
||||
type ProvidedProps = {
|
||||
classes: Object,
|
||||
disableActionSpacing: boolean,
|
||||
};
|
||||
|
||||
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 card actions do not have additional margin.
|
||||
*/
|
||||
disableActionSpacing?: boolean,
|
||||
};
|
||||
|
||||
function CardActions(props: ProvidedProps & Props) {
|
||||
function CardActions(props) {
|
||||
const { disableActionSpacing, children, classes, className, ...other } = props;
|
||||
|
||||
return (
|
||||
<div className={classNames(classes.root, className)} {...other}>
|
||||
{disableActionSpacing
|
||||
? children
|
||||
: cloneChildrenWithClassName(children, classes.actionSpacing)}
|
||||
{disableActionSpacing ? children : cloneChildrenWithClassName(children, classes.action)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
CardActions.propTypes = {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* If `true`, the card actions do not have additional margin.
|
||||
*/
|
||||
disableActionSpacing: PropTypes.bool,
|
||||
};
|
||||
|
||||
CardActions.defaultProps = {
|
||||
disableActionSpacing: false,
|
||||
};
|
||||
|
Reference in New Issue
Block a user