Completely updated React, fixed #11, (hopefully)
This commit is contained in:
56
goTorrentWebUI/node_modules/material-ui/Snackbar/SnackbarContent.js.flow
generated
vendored
56
goTorrentWebUI/node_modules/material-ui/Snackbar/SnackbarContent.js.flow
generated
vendored
@@ -1,16 +1,16 @@
|
||||
// @flow
|
||||
// @inheritedComponent Paper
|
||||
|
||||
import React from 'react';
|
||||
import type { Node } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import withStyles from '../styles/withStyles';
|
||||
import Paper from '../Paper';
|
||||
import Typography from '../Typography';
|
||||
import { emphasize } from '../styles/colorManipulator';
|
||||
|
||||
export const styles = (theme: Object) => {
|
||||
const type = theme.palette.type === 'light' ? 'dark' : 'light';
|
||||
const backgroundColor = theme.palette.shades[type].background.default;
|
||||
export const styles = theme => {
|
||||
const emphasis = theme.palette.type === 'light' ? 0.8 : 0.98;
|
||||
const backgroundColor = emphasize(theme.palette.background.default, emphasis);
|
||||
|
||||
return {
|
||||
root: {
|
||||
@@ -26,7 +26,7 @@ export const styles = (theme: Object) => {
|
||||
maxWidth: 568,
|
||||
borderRadius: 2,
|
||||
},
|
||||
[theme.breakpoints.down('md')]: {
|
||||
[theme.breakpoints.down('sm')]: {
|
||||
flexGrow: 1,
|
||||
},
|
||||
},
|
||||
@@ -43,30 +43,7 @@ export const styles = (theme: Object) => {
|
||||
};
|
||||
};
|
||||
|
||||
type ProvidedProps = {
|
||||
classes: Object,
|
||||
};
|
||||
|
||||
export type Props = {
|
||||
/**
|
||||
* The action to display.
|
||||
*/
|
||||
action?: Node,
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes?: Object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className?: string,
|
||||
/**
|
||||
* The message to display.
|
||||
*/
|
||||
message: Node,
|
||||
};
|
||||
|
||||
function SnackbarContent(props: ProvidedProps & Props) {
|
||||
function SnackbarContent(props) {
|
||||
const { action, classes, className, message, ...other } = props;
|
||||
|
||||
return (
|
||||
@@ -87,4 +64,23 @@ function SnackbarContent(props: ProvidedProps & Props) {
|
||||
);
|
||||
}
|
||||
|
||||
SnackbarContent.propTypes = {
|
||||
/**
|
||||
* The action to display.
|
||||
*/
|
||||
action: PropTypes.node,
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* The message to display.
|
||||
*/
|
||||
message: PropTypes.node,
|
||||
};
|
||||
|
||||
export default withStyles(styles, { name: 'MuiSnackbarContent' })(SnackbarContent);
|
||||
|
Reference in New Issue
Block a user